#Why would I add components to a system instead of just setting class variables?
1 messages · Page 1 of 1 (latest)
Personally I think accessing other systems should be considered an anti pattern in ecs but ignoring my personal opinion,
it was added for ISystem which is not a class but a struct and is strongly discouraged from being accessed directly
Yes, but I am talking about system internal state, I can just make that as a struct or class member, can't I?
So these components are for global state that I want to syntactically associate with a specific system?
thematically it's kind of nice to store the systems internal state on the entity
in practice though, not worth the effort and I would only use these entities to share state between systems if required
Often sharing native containers etc, for example EntityCommandBufferSystem.Singleton