Tanoda
GILES.pb_Selection Class Reference
Inheritance diagram for GILES.pb_Selection:
GILES.pb_MonoBehaviourSingleton< pb_Selection >

Static Public Member Functions

static void AddOnSelectionChangeListener (Callback< IEnumerable< GameObject > > del)
 
static void AddOnRemovedFromSelectionListener (Callback< IEnumerable< GameObject > > del)
 
static void Clear ()
 
static void SetSelection (IEnumerable< GameObject > selection)
 
static void SetSelection (GameObject selection)
 
static void AddToSelection (GameObject go)
 
static void RemoveFromSelection (GameObject go)
 
static void OnExternalUpdate ()
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from GILES.pb_MonoBehaviourSingleton< pb_Selection >
virtual void Initialize ()
 
virtual void Awake ()
 

Properties

static List< GameObject > gameObjects [get]
 A list of the currently selected GameObjects. More...
 
static GameObject activeGameObject [get]
 
- Properties inherited from GILES.pb_MonoBehaviourSingleton< pb_Selection >
virtual bool dontDestroyOnLoad [get]
 Override to maintain an instance of this object across level loads. More...
 
static T instance [get]
 
static T nullableInstance [get]
 

Events

Callback< IEnumerable< GameObject > > OnSelectionChange
 
Callback< IEnumerable< GameObject > > OnRemovedFromSelection
 

Detailed Description

Manages the current selection.

Definition at line 12 of file pb_Selection.cs.

Member Function Documentation

◆ AddOnRemovedFromSelectionListener()

static void GILES.pb_Selection.AddOnRemovedFromSelectionListener ( Callback< IEnumerable< GameObject > >  del)
static

Add a listener for selection removal.

Definition at line 45 of file pb_Selection.cs.

◆ AddOnSelectionChangeListener()

static void GILES.pb_Selection.AddOnSelectionChangeListener ( Callback< IEnumerable< GameObject > >  del)
static

Add a listener for selection changes.

Definition at line 34 of file pb_Selection.cs.

◆ AddToSelection()

static void GILES.pb_Selection.AddToSelection ( GameObject  go)
static

Append go to the current selection (doesn't add in the event that it is already in the selection list).

Definition at line 118 of file pb_Selection.cs.

◆ Awake()

override void GILES.pb_Selection.Awake ( )
protectedvirtual

Delegate called when a new GameObject is selected.

See also
AddOnSelectionChangeListener

Reimplemented from GILES.pb_MonoBehaviourSingleton< pb_Selection >.

Definition at line 14 of file pb_Selection.cs.

◆ Clear()

static void GILES.pb_Selection.Clear ( )
static

Clear all objects in the current selection.

Definition at line 61 of file pb_Selection.cs.

◆ OnExternalUpdate()

static void GILES.pb_Selection.OnExternalUpdate ( )
static

Called by code changes to the current selection that should update the pb_SceneEditor in use. For example, this is used by the Inspector to update the handles and other scene gizmos when changing transform values.

Definition at line 152 of file pb_Selection.cs.

◆ RemoveFromSelection()

static void GILES.pb_Selection.RemoveFromSelection ( GameObject  go)
static

Remove an object from the current selection.

Definition at line 129 of file pb_Selection.cs.

◆ SetSelection() [1/2]

static void GILES.pb_Selection.SetSelection ( GameObject  selection)
static

Clear the selection lists and set them to selection.

Definition at line 109 of file pb_Selection.cs.

◆ SetSelection() [2/2]

static void GILES.pb_Selection.SetSelection ( IEnumerable< GameObject >  selection)
static

Clear the selection lists and set them to selection.

Definition at line 92 of file pb_Selection.cs.

Property Documentation

◆ activeGameObject

GameObject GILES.pb_Selection.activeGameObject
staticget

Returns the first gameObject in the selection list.

Definition at line 81 of file pb_Selection.cs.

◆ gameObjects

List<GameObject> GILES.pb_Selection.gameObjects
staticget

A list of the currently selected GameObjects.

Definition at line 56 of file pb_Selection.cs.

Event Documentation

◆ OnRemovedFromSelection

Callback<IEnumerable<GameObject> > GILES.pb_Selection.OnRemovedFromSelection

Event called on objects that were previously selected but now are not.

Definition at line 29 of file pb_Selection.cs.

◆ OnSelectionChange

Callback<IEnumerable<GameObject> > GILES.pb_Selection.OnSelectionChange

Definition at line 24 of file pb_Selection.cs.


The documentation for this class was generated from the following file: