Skip to content

Commit

Permalink
Fix cancel button being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvinas01 committed Sep 26, 2024
1 parent 2442a7f commit 7095613
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Packages/com.chark.scriptable-scenes/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- Menu item order to use `150` instead of `-1000`. This way `CHARK` won't dominate existing entries.

### Fixed

- Cancel button being ignored when switching scenes via the "Open" button.

## [v0.0.10](https://github.com/chark/scriptable-scenes/compare/v0.0.9...v0.0.10) - 2023-10-04

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ internal static void Open(this ScriptableSceneCollection collection)

var scriptableScenes = collection.Scenes.ToList();
if (scriptableScenes.Count == 0)
{
Debug.LogWarning($"Collection {collection.Name} does not contain any scenes", collection);
return;
}

if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo() == false)
{
return;
}
Expand All @@ -132,8 +138,6 @@ internal static void Open(this ScriptableSceneCollection collection)
var scriptableScene = scriptableScenes[index];
var scenePath = scriptableScene.ScenePath;

EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo();

Scene scene;
if (index == 0)
{
Expand Down

0 comments on commit 7095613

Please sign in to comment.