diff --git a/Editor/Toolbar/Tools/ToolScenePickerEditorStateChanged.cs b/Editor/Toolbar/Tools/ToolScenePickerEditorStateChanged.cs index ed2f673..0985590 100644 --- a/Editor/Toolbar/Tools/ToolScenePickerEditorStateChanged.cs +++ b/Editor/Toolbar/Tools/ToolScenePickerEditorStateChanged.cs @@ -1,5 +1,6 @@ using Module.NavigationTool.Editor.Tools; using UnityEditor; +using UnityEditor.SceneManagement; using UnityEngine.SceneManagement; namespace Module.NavigationTool.Editor.Toolbar @@ -11,6 +12,7 @@ namespace Module.NavigationTool.Editor.Toolbar { EditorApplication.playModeStateChanged += OnPlayModeStateChanged; SceneManager.activeSceneChanged += OnActiveSceneChanged; + EditorSceneManager.newSceneCreated += OnNewSceneCreated; } private static void OnPlayModeStateChanged(PlayModeStateChange state) @@ -22,5 +24,10 @@ namespace Module.NavigationTool.Editor.Toolbar { ToolScenePicker.SetAsDirty(); } + + private static void OnNewSceneCreated(Scene scene, NewSceneSetup setup, NewSceneMode mode) + { + ToolScenePicker.SetAsDirty(); + } } } \ No newline at end of file diff --git a/package.json b/package.json index 9ee3299..e888551 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.module.navigationtool", - "version": "0.8.2", + "version": "0.8.3", "displayName": "Module.NavigationTool", "description": "Support for navigation tools, like favorites, history and toolbars", "unity": "2019.2",