Fix creating prefab in Editor from selection in Prefab window

This commit is contained in:
Wojtek Figat
2021-08-08 17:25:18 +02:00
parent 6ac0d5d3f4
commit 6609425880
2 changed files with 16 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ namespace FlaxEditor.Windows.Assets
contextMenu.AddSeparator();
b = contextMenu.AddButton("Create Prefab", Editor.Prefabs.CreatePrefab);
b = contextMenu.AddButton("Create Prefab", () => Editor.Prefabs.CreatePrefab(Selection));
b.Enabled = isSingleActorSelected &&
(Selection[0] as ActorNode).CanCreatePrefab &&
Editor.Windows.ContentWin.CurrentViewFolder.CanHaveAssets;