Modernize the code to use unified scene access #3513

This commit is contained in:
Wojtek Figat
2025-08-28 23:48:25 +02:00
parent 703e0cb7ca
commit d47ac95681
9 changed files with 64 additions and 23 deletions

View File

@@ -1,8 +1,9 @@
// Copyright (c) Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.SceneGraph;
using FlaxEditor.Viewport;
using FlaxEngine;
using System.Collections.Generic;
namespace FlaxEditor
{
@@ -39,9 +40,23 @@ namespace FlaxEditor
/// </summary>
void RenameSelection();
/// <summary>
/// Deletes selected objects.
/// </summary>
void DeleteSelection();
/// <summary>
/// Focuses selected objects.
/// </summary>
void FocusSelection();
/// <summary>
/// Spawns the specified actor to the game (with undo).
/// </summary>
/// <param name="actor">The actor.</param>
/// <param name="parent">The parent actor. Set null as default.</param>
/// <param name="orderInParent">The order under the parent to put the spawned actor.</param>
/// <param name="autoSelect">True if automatically select the spawned actor, otherwise false.</param>
void Spawn(Actor actor, Actor parent = null, int orderInParent = -1, bool autoSelect = true);
}
}

View File

@@ -175,7 +175,7 @@ namespace FlaxEditor.SceneGraph
public List<SceneGraphNode> Selection => SceneContext.Selection;
/// <summary>
/// Gets the list of selected scene graph nodes in the editor context.
/// Gets the scene editing context.
/// </summary>
public abstract ISceneEditingContext SceneContext { get; }
}