private static void EditorSceneManagerOnNewSceneCreated(Scene scene, NewSceneSetup setup, NewSceneMode mode) { if (mode == NewSceneMode.Single) { SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes(); } //need to clear scene on new scene since all new scenes use the same GUID SceneVisibilityState.ClearScene(scene); }