Class SelectionGroup
This class is used to provide selection group information during play-mode. It reflects the information in the Editor-only class.
Inherited Members
Namespace: Unity.SelectionGroups.Runtime
Syntax
public class SelectionGroup : MonoBehaviour
Fields
color
A color assigned to this group.
Declaration
public Color color
Field Value
| Type | Description |
|---|---|
| Color |
groupId
Unique ID of this group.
Declaration
public int groupId
Field Value
| Type | Description |
|---|---|
| Int32 |
members
The members of this group.
Declaration
public List<Object> members
Field Value
| Type | Description |
|---|---|
| List<Object> |
query
If not empty, this is a GoQL query string used to create the set of matching objects for this group.
Declaration
public string query
Field Value
| Type | Description |
|---|---|
| String |
Methods
EnumerateGameObjects()
An enumerator that matches only the GameObject members of this group.
Declaration
public IEnumerable<GameObject> EnumerateGameObjects()
Returns
| Type | Description |
|---|---|
| IEnumerable<GameObject> |
GetMemberComponents<T>()
Get components from all members of a group that are GameObjects.
Declaration
public IEnumerable<T> GetMemberComponents<T>()
where T : Component
Returns
| Type | Description |
|---|---|
| IEnumerable<T> |
Type Parameters
| Name | Description |
|---|---|
| T |