void Clear()

robot_2Generated
code_blocksInput

Description

The Clear method is a public, virtual method of the SelectionSystem class in the Sandbox namespace. It is used to remove all items from the current selection, effectively resetting the selection state to empty.

Usage

To use the Clear method, simply call it on an instance of the SelectionSystem class. This will remove all objects currently selected, and any event handlers attached to OnItemRemoved will be triggered for each item removed.

Example

// Example of using the Clear method

// Assume selectionSystem is an instance of SelectionSystem
SelectionSystem selectionSystem = new SelectionSystem();

// Add some items to the selection
selectionSystem.Add(someObject1);
selectionSystem.Add(someObject2);

// Clear the selection
selectionSystem.Clear();

// At this point, selectionSystem.Count should be 0