World
A World owns both an EntityManager and a set of ComponentSystems. You can create as many World objects as you like. Commonly you can create a simulation World and a rendering or presentation World.
By default you create a single World when you enter Play Mode and populate it with all available ComponentSystem objects in the Project. However, you can disable the default World creation and replace it with your own code via global defines as follows:
#UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLDdisables generation of the default runtime World.#UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_EDITOR_WORLDdisables generation of the default Editor World.#UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAPdisables generation of both default Worlds.
Further information
- Default World creation code (see file: Packages/com.unity.entities/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs)
- Automatic bootstrap entry point (see file: Packages/com.unity.entities/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs)