Add option to Scene context menu to unload it

This commit is contained in:
Wojtek Figat
2021-08-10 16:32:00 +02:00
parent e288104472
commit 670e48ec1c
2 changed files with 27 additions and 13 deletions

View File

@@ -104,12 +104,11 @@ namespace FlaxEditor.Windows
Editor.Windows.ContentWin.CurrentViewFolder.CanHaveAssets;
bool hasPrefabLink = canEditScene && isSingleActorSelected && (Editor.SceneEditing.Selection[0] as ActorNode).HasPrefabLink;
b = contextMenu.AddButton("Select Prefab", Editor.Prefabs.SelectPrefab);
b.Enabled = hasPrefabLink;
b = contextMenu.AddButton("Break Prefab Link", Editor.Prefabs.BreakLinks);
b.Enabled = hasPrefabLink;
if (hasPrefabLink)
{
contextMenu.AddButton("Select Prefab", Editor.Prefabs.SelectPrefab);
contextMenu.AddButton("Break Prefab Link", Editor.Prefabs.BreakLinks);
}
// Spawning actors options