The Selection
property of the EditorTool
class provides access to the SelectionSystem
associated with the editor tool. This system is responsible for managing the selection of objects within the editor environment.
The Selection
property of the EditorTool
class provides access to the SelectionSystem
associated with the editor tool. This system is responsible for managing the selection of objects within the editor environment.
Use the Selection
property to interact with the selection system of the editor tool. This can be useful for operations that require knowledge of the currently selected objects or for modifying the selection programmatically.
// Example of accessing the Selection property EditorTool myTool = new EditorTool(); Sandbox.SelectionSystem selectionSystem = myTool.Selection; // Use the selection system to perform operations var selectedObjects = selectionSystem.GetSelectedObjects(); foreach (var obj in selectedObjects) { // Perform operations on each selected object }