RuntimeSetGameObject

class RuntimeSetGameObject : RuntimeSetBase<T>, IEnumerable<GameObject>

A global set of GameObjects, curated at runtime. Stores only the GameObject itself for some limited, but optimized usage cases - mainly to check whether a GameObject is in it or to destroy all elements at once.

Properties

elementCount : int

Methods

bool Add(GameObject go)

Adds a GameObject to the RuntimeSet. Only succeeds when an "element" could be created by applying the RuntimeSet's rules.

bool Contains(GameObject go)

Checks whether a specific GameObject is part of this set.

void Remove(GameObject go)

Removes a GameObject from the RuntimeSet.

void ForEach(Action<GameObject> action)

Invokes the given action on every element in this RuntimeSet. Adding or removing elements to or from this set is okay. Elements added during the iteration are not taken into account for it.

IEnumerator<GameObject> GetEnumerator()