Class SceneEditingModule
Editing scenes module. Manages scene objects selection and editing modes.
Inheritance
Namespace: FlaxEditor.Modules
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class SceneEditingModule : EditorModule
Fields
Selection
The selected objects.
Declaration
public readonly List<SceneGraphNode> Selection
Field Value
|
System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode>
|
Properties
HasSthSelected
Gets a value indicating whether any object is selected.
Declaration
public bool HasSthSelected { get; }
Property Value
|
System.Boolean
|
SelectionCount
Gets the amount of the selected objects.
Declaration
public int SelectionCount { get; }
Property Value
|
System.Int32
|
Methods
Convert(Type)
Converts the selected actor to another type.
Declaration
public void Convert(Type to)
Parameters
|
System.Type
to
The type to convert in. |
Copy()
Copies the selected objects.
Declaration
public void Copy()
CreateParentForSelectedActors()
Create parent for selected actors.
Declaration
public void CreateParentForSelectedActors()
Cut()
Cuts the selected objects. Supports undo/redo.
Declaration
public void Cut()
Delete()
Deletes the selected objects. Supports undo/redo.
Declaration
public void Delete()
Deselect()
Clears selected objects collection.
Declaration
public void Deselect()
Deselect(SceneGraphNode)
Deselects given object.
Declaration
public void Deselect(SceneGraphNode node)
Parameters
|
FlaxEditor.SceneGraph.SceneGraphNode
node
|
DeselectAllScenes()
Deselects all scenes.
Declaration
public void DeselectAllScenes()
Duplicate()
Duplicates the selected objects. Supports undo/redo.
Declaration
public void Duplicate()
OnInit()
Declaration
public override void OnInit()
Overrides
OnSelectionChanged()
Called when selection gets changed. Invokes the other events and updates editor. Call it when you manually modify selected objects collection.
Declaration
public void OnSelectionChanged()
Paste()
Pastes the copied objects. Supports undo/redo.
Declaration
public void Paste()
Paste(Actor)
Pastes the copied objects. Supports undo/redo.
Declaration
public void Paste(Actor pasteTargetActor)
Parameters
|
Actor
pasteTargetActor
The target actor to paste copied data. |
Select(SceneGraphNode, Boolean)
Selects the specified object.
Declaration
public void Select(SceneGraphNode selection, bool additive = false)
Parameters
|
FlaxEditor.SceneGraph.SceneGraphNode
selection
The selection. |
|
System.Boolean
additive
if set to |
Select(SceneGraphNode[], Boolean)
Selects the specified collection of objects.
Declaration
public void Select(SceneGraphNode[] selection, bool additive = false)
Parameters
|
FlaxEditor.SceneGraph.SceneGraphNode[]
selection
The selection. |
|
System.Boolean
additive
if set to |
Select(Actor)
Selects the specified actor (finds it's scene graph node).
Declaration
public void Select(Actor actor)
Parameters
|
Actor
actor
The actor. |
Select(List<SceneGraphNode>, Boolean)
Selects the specified collection of objects.
Declaration
public void Select(List<SceneGraphNode> selection, bool additive = false)
Parameters
|
System.Collections.Generic.List<FlaxEditor.SceneGraph.SceneGraphNode>
selection
The selection. |
|
System.Boolean
additive
if set to |
SelectActorsUsingAsset(Guid, Boolean)
Selects the actors using the given asset.
Declaration
public void SelectActorsUsingAsset(Guid assetId, bool additive = false)
Parameters
|
System.Guid
assetId
The asset ID. |
|
System.Boolean
additive
if set to |
SelectAllScenes()
Selects all scenes.
Declaration
public void SelectAllScenes()
Spawn(Actor, Actor, Int32, Boolean)
Spawns the specified actor to the game (with undo).
Declaration
public void Spawn(Actor actor, Actor parent = null, int orderInParent = -1, bool autoSelect = true)
Parameters
|
Actor
actor
The actor. |
|
Actor
parent
The parent actor. Set null as default. |
|
System.Int32
orderInParent
The order under the parent to put the spawned actor. |
|
System.Boolean
autoSelect
True if automatically select the spawned actor, otherwise false. |
Events
SelectionChanged
Occurs when selected objects collection gets changed.
Declaration
public event Action SelectionChanged
Event Type
|
System.Action
|
SelectionDeleteBegin
Occurs before selection delete action.
Declaration
public event Action SelectionDeleteBegin
Event Type
|
System.Action
|
SelectionDeleteEnd
Occurs after selection delete action.
Declaration
public event Action SelectionDeleteEnd
Event Type
|
System.Action
|
SpawnBegin
Occurs before spawning actor to game action.
Declaration
public event Action SpawnBegin
Event Type
|
System.Action
|
SpawnEnd
Occurs after spawning actor to game action.
Declaration
public event Action SpawnEnd
Event Type
|
System.Action
|