Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    267
    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?