RuntimeSetBase<T>
class
RuntimeSetBase : RuntimeSetBase, IEnumerable<T>
A global set of GameObjects, curated at runtime.
Methods
void ForEach(Action<T> 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.
IEnumerable<T> GetAllElements()
Returns a collection of all elements in this RuntimeSet that updates if the RuntimeSet contents change.
IEnumerator<T> GetEnumerator()
RuntimeSetBase
class
RuntimeSetBase : ScriptableObject
Properties
elementCount : int
onElementCountChange : SodaEvent<int>
This event is invoked when an item is added or removed.
Methods
bool Add(GameObject gameObject)
Adds a GameObject to the RuntimeSet. Only succeeds when an "element" could be created by applying the RuntimeSet's rules.
bool Insert(int index, GameObject gameObject)
Inserts a GameObject to the RuntimeSet at the given index. Only succeeds when an "element" could be created by applying the RuntimeSet's rules.
bool Allows(GameObject gameObject)
Returns whether or not the given GameObject matches the specifications of this RuntimeSet, which means that it can be added.
void Remove(GameObject gameObject)
Removes a GameObject from the RuntimeSet.
void RemoveAt(int index)
Removes a GameObject from the RuntimeSet.
bool Contains(GameObject gameObject)
Checks whether a specific GameObject is part of this set.
GameObject GetGameObjectAt(int index)
Returns the GameObject with the specified index.
This returns the GameObject, as compared to myRuntimeSet[index], which returns the element.