Search Unity

Question Destroying all entities in 1.0

Discussion in 'Entity Component System' started by Bas-Smit, Dec 3, 2022.

  1. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    274
    Pre 1.0 I used the following to destroy all entities:

    EntityManager.DestroyEntity(em.UniversalQuery);


    which in 1.0 gives this error:

    InvalidOperationException: You cannot Release a GameObjectSceneHandle from a Job.


    How should I destroy all entities in 1.0?