Fix changing prefab root

#488 #544 #489
This commit is contained in:
Wojtek Figat
2021-07-09 17:17:21 +02:00
parent 4fee75cf55
commit 7fc3e65849
6 changed files with 142 additions and 64 deletions

View File

@@ -103,7 +103,7 @@ namespace FlaxEditor.Windows.Assets
b.Enabled = hasSthSelected && !isRootSelected;
b = contextMenu.AddButton("Set Root", SetRoot);
b.Enabled = isSingleActorSelected && !isRootSelected && hasPrefabLink;
b.Enabled = isSingleActorSelected && !isRootSelected && hasPrefabLink && Editor.Internal_CanSetToRoot(FlaxEngine.Object.GetUnmanagedPtr(Asset), FlaxEngine.Object.GetUnmanagedPtr(((ActorNode)Selection[0]).Actor));
// Prefab options