From 0a2858f8ca5d063fea87932ec7c89ce4ae527adb Mon Sep 17 00:00:00 2001 From: Ejlersen Date: Sat, 16 Oct 2021 02:01:28 +0200 Subject: [PATCH] 0.8.3: Fixed issue, where creating a new scene didn't set scene picker as dirty --- Editor/Toolbar/Tools/ToolScenePickerEditorStateChanged.cs | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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",