Selection Manager

Introduction

Part of the Selection System of the UX Complete asset

This component simply exposes the selection changed event to the Unity Inspector and a selection of the common selection funcitons.

Selection Manager is a .NET IColleciton of SelectableObjects ... this means you can iterate over it to iterate over the selected objects

foreach(var selected in selectionManager)
{
    Debug.Log(selected.name + " is selected");
}

Definition

Fields and Attributes

TypeNameNotes

int

Count

Gets the count of currently selected objects

bool

IsReadOnly

Always returns true

Events

Selection Changed

Occurs when the list of selected object's changes

Funcitons

This simply operates the API.Selection interface. The interface its self has far more useful funcitons such as searching of selected objects and more.

You are strongly encuraged to use API.Selection directly.

Add

Adds the object to the selection

Add Range

Adds multiple objects to the selection

Remove

Removes an object from selection

Remove All

Removes all matching items from the selection

Clear

Clears all items from the selection

Contains

Returns true if the indicated item is in the selection

Copy To

Copies the selection to a target array

Get Enumerator

Used to iterate over the selected items

Last updated