Class SelectionGroupContainer
This class is used to maintain the child set of SelectionGroups in play-mode.
Inherited Members
Namespace: Unity.SelectionGroups.Runtime
Syntax
[ExecuteInEditMode]
public class SelectionGroupContainer : MonoBehaviour
Fields
groups
A mapping of group Id to SelectionGroup instances.
Declaration
public Dictionary<int, SelectionGroup> groups
Field Value
| Type | Description |
|---|---|
| Dictionary<Int32, SelectionGroup> |
instances
The set of instances of this class. There may be more than one instance if multiple scenes are loaded.
Declaration
public static HashSet<SelectionGroupContainer> instances
Field Value
| Type | Description |
|---|---|
| HashSet<SelectionGroupContainer> |
Properties
Groups
Allows enumeration over all SelectionGroup instances which may be contained in multiple SelectionGroupContainer instances.
Declaration
public static IEnumerable<SelectionGroup> Groups { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<SelectionGroup> |
Methods
AddGroup(Int32)
Add a SelectionGroup to this container using a unique ID.
Declaration
public SelectionGroup AddGroup(int id)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | id |
Returns
| Type | Description |
|---|---|
| SelectionGroup |