-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Is there any specific reason that components need to be structs? Is that Lex/LeoECS purely being opinionated or am I missing something? Arrays are guaranteed to have a linear layout, even for reference types. Is this due to the indirection via the ItemPool
struct?
I know that in an ideal performance-oriented world we'd just have structs filled with value fields, but having to handle references to components via ref is a pain (and potentially prone to errors, because, you know, structs generally shouldn't be passed around as refs most of the time...). So unless I'm missing something, allowing reference types as components wouldn't necessarily negatively impact performance for pools/systems that only utilize structs, right? If so, why not open up the architecture a little and drop the struct
enforcing?