void CleanupScene(SubScene scene) { // Debug.Log("CleanupScene: " + scene.SceneName); scene.CleanupLiveLink(); var streamingSystem = World.GetExistingManager <SubSceneStreamingSystem>(); foreach (var sceneEntity in scene._SceneEntities) { streamingSystem.UnloadSceneImmediate(sceneEntity); EntityManager.DestroyEntity(sceneEntity); } scene._SceneEntities = new List <Entity>(); scene.UpdateSceneEntities(); }