In the code where it is still not ECS I would like to get all the entities with some component like [Inject] can do. And then probably dispose them because I see EntityManager.DestroyEntity has one overload which takes a component group.
-
The problem is
GetComponentGroup
, the only way I found to create one, is the member method ofComponentSystem
. What can I do outside of it? What’s left is onlyEntityManager.GetAllEntities
-
The temporary solution right now is I have that code remember all the
Entity
it spawn and destroy them using those remembered ID. But this is unwieldly and my true intent is to “just destroy all the things with a certain component” and not having to remember.