Fix scene tree menu options being enabled when not supposed to be

This commit is contained in:
Chandler Cox
2024-11-21 20:24:16 -06:00
parent d4b663cd1a
commit 2a7dcff5c4
2 changed files with 7 additions and 6 deletions

View File

@@ -81,6 +81,7 @@ namespace FlaxEditor.SceneGraph.Actors
if (Level.ScenesCount > 1)
contextMenu.AddButton("Unload all but this scene", OnUnloadAllButSelectedScene).LinkTooltip("Unloads all of the active scenes except for the selected scene.").Enabled = Editor.Instance.StateMachine.CurrentState.CanChangeScene;
contextMenu.MaximumItemsInViewCount += 3;
base.OnContextMenu(contextMenu, window);
}