How have you stored archetype references?

I had this same question here and it was tertle that helped me out as well lol
What ive been doing is just creating a static class with a bunch of ComponentType[ ] that can be used in CreateEntity(). ECS will try to find that archetype if it already exists and provide it to you. You dont want to store EntityArchetypes as they are specific to each EntityManager. Its better to just always refer back to the array of ComponentTypes and let the EM do the heavy lifting on CreateManager.

1 Like