From 9791cf70f71e497402efd8d5884ac88f8f96586a Mon Sep 17 00:00:00 2001 From: Hubert Mattusch Date: Tue, 20 Dec 2022 23:38:18 +0100 Subject: [PATCH] Add save when exiting scene --- Editor/ToolsWindowBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Editor/ToolsWindowBase.cs b/Editor/ToolsWindowBase.cs index 64c8bdf..d200732 100644 --- a/Editor/ToolsWindowBase.cs +++ b/Editor/ToolsWindowBase.cs @@ -77,6 +77,7 @@ namespace NegUtils.Editor { if(!EditorPrefs.GetBool("StartFromSceneIndex0")) return; + EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo(); EditorPrefs.SetString("LastOpenedScenePath", EditorSceneManager.GetSceneManagerSetup()[0].path); EditorSceneManager.OpenScene(EditorBuildSettings.scenes[0].path); }