You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ask AI, it says "Your component-embedded class leads to multiple pointer jumps, further reducing CPU cache hit rate.". It's that ture? Should I care about that?
What if my class in component has function in it? Different answer?
public struct HealthComponent : IComponent {
public int CurrentHP;
public int MaxHP;
}
From ↑ to ↓
public class HealthComponent : IComponent {
public HealthData Health;
}
public class HealthData {
public int CurrentHP;
public int MaxHP;
}
The text was updated successfully, but these errors were encountered:
True, each ref to another class is a jump, but you can use classes in components.
In your case I think the following makes sense, also avoiding an additional class:
Uh oh!
There was an error while loading. Please reload this page.
Ask AI, it says "Your component-embedded class leads to multiple pointer jumps, further reducing CPU cache hit rate.". It's that ture? Should I care about that?
What if my class in component has function in it? Different answer?
From ↑ to ↓
The text was updated successfully, but these errors were encountered: