Merge branch 'Tryibion-paste-fix'

This commit is contained in:
Wojtek Figat
2023-08-14 16:20:14 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -503,7 +503,7 @@ namespace FlaxEditor.Modules
// Set paste target if only one actor is selected and no target provided
if (pasteTargetActor == null && SelectionCount == 1 && Selection[0] is ActorNode actorNode)
{
pasteTargetActor = actorNode.Actor;
pasteTargetActor = actorNode.Actor.Scene == actorNode.Actor ? actorNode.Actor : actorNode.Actor.Parent;
}
// Create paste action

View File

@@ -144,7 +144,7 @@ namespace FlaxEditor.Windows.Assets
// Set paste target if only one actor is selected and no target provided
if (pasteTargetActor == null && Selection.Count == 1 && Selection[0] is ActorNode actorNode)
{
pasteTargetActor = actorNode.Actor;
pasteTargetActor = actorNode.Actor.IsPrefabRoot ? actorNode.Actor : actorNode.Actor.Parent;
}
// Create paste action