Skip to content

Commit

Permalink
Fixed a bug where ArgumentException would occur when importing uPalet…
Browse files Browse the repository at this point in the history
…teStore while a scene that hasn't been saved as an asset is open.
  • Loading branch information
Haruma-K committed Jan 10, 2025
1 parent 3973bf8 commit 43d991e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public void Reload()
_paletteEditorWindow?.Reload();
_themeEditorWindow?.Reload();

var activeScene = SceneManager.GetActiveScene().path;
EditorSceneManager.OpenScene(activeScene);
var activeScenePath = SceneManager.GetActiveScene().path;
if (!string.IsNullOrEmpty(activeScenePath)) // Open the scene only if the scene is saved as an asset = if there is a path
EditorSceneManager.OpenScene(activeScenePath);
}

public static UPaletteEditorApplication RequestInstance()
Expand Down

0 comments on commit 43d991e

Please sign in to comment.