Fixed issue, where scenes could be valid, but not loaded and still crash Unity Editor when accessing path
This commit is contained in:
parent
d34a50767b
commit
230a976a52
4 changed files with 16 additions and 4 deletions
|
|
@ -38,7 +38,11 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
for (var i = 0; i < SceneList.labels.Length; i++)
|
||||
{
|
||||
var sceneIndex = i;
|
||||
menu.AddItem(SceneList.labels[i], SceneList.selected.Contains(i), () => SelectScene(sceneIndex));
|
||||
menu.AddItem(SceneList.labels[i], SceneList.selected.Contains(i), () =>
|
||||
{
|
||||
if (!Application.isPlaying)
|
||||
SelectScene(sceneIndex);
|
||||
});
|
||||
}
|
||||
|
||||
menu.DropDown(rect);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue