diff --git a/Source/Editor/Viewport/ViewportDraggingHelper.cs b/Source/Editor/Viewport/ViewportDraggingHelper.cs index 21287fc94..3e6fce6ad 100644 --- a/Source/Editor/Viewport/ViewportDraggingHelper.cs +++ b/Source/Editor/Viewport/ViewportDraggingHelper.cs @@ -198,6 +198,11 @@ namespace FlaxEditor.Viewport actor.Position = PostProcessSpawnedActorLocation(actor, ref hitLocation); _owner.Spawn(actor); _viewport.Focus(); + + // Scroll to the new actor in the hierarchy + var actorNode = Editor.Instance.Scene.GetActorNode(actor); + if (actorNode?.TreeNode.ParentTree.Parent is Panel treePanel) + FlaxEngine.Scripting.InvokeOnUpdate(() => treePanel.ScrollViewTo(actorNode.TreeNode)); } private void Spawn(ScriptItem item, SceneGraphNode hit, ref Float2 location, ref Vector3 hitLocation, ref Vector3 hitNormal)