Fix incorrect scene object memory leak printing if some objects are destroyed during game plugin shutdown

This commit is contained in:
Wojtek Figat
2025-03-28 15:35:38 +01:00
parent 54f73fe35a
commit ab348d5f34
2 changed files with 2 additions and 2 deletions

View File

@@ -195,6 +195,8 @@ namespace FlaxEditor.States
SceneRestoring?.Invoke();
_duplicateScenes.UnloadScenes();
PluginManager.Internal_DeinitializeGamePlugins();
FlaxEngine.Scripting.FlushRemovedObjects();
Editor.WipeOutLeftoverSceneObjects();
Editor.Internal_SetPlayMode(false);
_duplicateScenes.RestoreSceneData();
SceneRestored?.Invoke();

View File

@@ -144,8 +144,6 @@ namespace FlaxEditor.Utilities
Editor.LogError("Failed to unload scenes.");
return;
}
FlaxEngine.Scripting.FlushRemovedObjects();
Editor.WipeOutLeftoverSceneObjects();
Profiler.EndEvent();
}