how to get rid of "Prefab" entities when i still need them?

When i have prefab like entities, that identifications i store in a singleton IComponent to be used with Instantiate from entitycommandbuffer or entitymanager, how can i then achieve that it is not ben used by queries?

should i ad a disable component, and when i want to instatiate with it then remove the disable and then add it agan?
or should we at all prefer to use the archetypes instead of that entity prefabs?

or is there just some small trick that i just not see? =)

There is a Prefab component that you can put into your prefab entities.
Entities with the Prefab component are excluded from entity queries automatically, similar to the Disabled component.
When instantiating an entity with a Prefab component the Prefab component gets removed automatically.

1 Like

oh woow! that is helpfull. thank you