Struct vs Class Components
Hi, started using entitas and I am loving it.
I have some questions, though.
Are there any performance differences to declare a component as a struct or as a class? If I have a component that is part of different contexts. Does entitas store it continually? Something like:
readonly IGroup<GameEntity> Group1 = _context.game.GetGroup(GameMatcher.Position2D);
readonly IGroup<InputEntity> Group2 = _contexts.input.GetGroup(InputMatcher.Position2D);
Also, do we have something like a multi group? A group with entities of different contexts?
Hi @mororo250 In Entitas use classes for components. Components are pooled and reused.
Groups are restricted to 1 context type only. Maybe a MultiReactiveSystem can help you, not sure what your use-case is
@mororo250 btw, very happy to hear that you like it :D
Will close, feel free to reopen, if there's anything else