Compare commits

..

No commits in common. "master" and "2.0.1" have entirely different histories.

4 changed files with 4 additions and 16 deletions

View file

@ -1,18 +1,13 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [2.0.2] - 2025-12-15
### Fixed
- Fixed issue, where scenes could be valid, but not loaded and still crash Unity Editor when accessing path
## [2.0.1] - 2025-12-15 ## [2.0.1] - 2025-12-15
### Fixed ### Fixed
- Fixed issue, where fetching scenes would not initially check if the scene was valid before accessing the path - Fixed issue, where fetching scenes would not initially check if the scene was valid before accessing the path
## [2.0.0] - 2025-12-06 ## [2.0.0] - 2025-12-06
- Navigation tools upgraded to use the new `MainToolbarElement` API - Navigation tools upgraded to use the new `MainToolbarElement` API

View file

@ -38,11 +38,7 @@ namespace Module.NavigationTool.Editor.Toolbar
for (var i = 0; i < SceneList.labels.Length; i++) for (var i = 0; i < SceneList.labels.Length; i++)
{ {
var sceneIndex = i; var sceneIndex = i;
menu.AddItem(SceneList.labels[i], SceneList.selected.Contains(i), () => menu.AddItem(SceneList.labels[i], SceneList.selected.Contains(i), () => SelectScene(sceneIndex));
{
if (!Application.isPlaying)
SelectScene(sceneIndex);
});
} }
menu.DropDown(rect); menu.DropDown(rect);

View file

@ -2,7 +2,6 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using UnityEditor; using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
@ -249,9 +248,7 @@ namespace Module.NavigationTool.Editor.Toolbar
{ {
Scene scene = SceneManager.GetSceneAt(i); Scene scene = SceneManager.GetSceneAt(i);
if (!scene.IsValid() || !scene.isLoaded) if (!scene.IsValid() || string.IsNullOrEmpty(scene.path))
continue;
if (string.IsNullOrEmpty(scene.path))
continue; continue;
int index = IndexOfPath(scenes, scene.path, false); int index = IndexOfPath(scenes, scene.path, false);

View file

@ -1,6 +1,6 @@
{ {
"name": "com.module.navigationtool", "name": "com.module.navigationtool",
"version": "2.0.2", "version": "2.0.1",
"displayName": "Module.NavigationTool", "displayName": "Module.NavigationTool",
"description": "Support for navigation tools, like favorites, history and toolbars", "description": "Support for navigation tools, like favorites, history and toolbars",
"unity": "2019.2", "unity": "2019.2",