Merge branch 'FlaxEngine:master' into GizmoSnaping

This commit is contained in:
NoriteSC
2023-12-20 23:15:18 +01:00
committed by GitHub
185 changed files with 6037 additions and 3555 deletions

View File

@@ -201,7 +201,21 @@ namespace FlaxEditor.Gizmo
ActorNode prefabRoot = GetPrefabRootInParent(actorNode);
if (prefabRoot != null && actorNode != prefabRoot)
{
hit = WalkUpAndFindActorNodeBeforeSelection(actorNode, prefabRoot);
bool isPrefabInSelection = false;
foreach (var e in sceneEditing.Selection)
{
if (e is ActorNode ae && GetPrefabRootInParent(ae) == prefabRoot)
{
isPrefabInSelection = true;
break;
}
}
// Skip selecting prefab root if we already had object from that prefab selected
if (!isPrefabInSelection)
{
hit = WalkUpAndFindActorNodeBeforeSelection(actorNode, prefabRoot);
}
}
}