ComponentList
public class ComponentList Properties
| Name | Type | Description |
|---|---|---|
Count | Int32 | Amount of components - including disabled |
Methods
IEnumerable<Component> GetAll() Get all components, including disabled ones
Component Create(TypeDescription type, Boolean startEnabled = True) Add a component of this type
T Create(Boolean startEnabled = True) Add a component of this type
T Get(FindMode search) Get a component of this type
IEnumerable<Component> GetAll(Type type, FindMode find) Get all components of this type
IEnumerable<Component> GetAll(FindMode find) Get all components
IEnumerable<T> GetAll(FindMode find = 69) Get a list of components on this game object, optionally recurse when deep is true
Boolean TryGet(T component, FindMode search = 5) Try to get this component
Component FirstOrDefault(Func<Component, Boolean> value) Void ForEach(String name, Boolean includeDisabled, Action<T> action) Void ForEach(String name, Boolean includeDisabled, Action<Component> action) Void Move(Component baseComponent, Int32 delta) Move the position of the component in the list by delta (-1 means up one, 1 means down one)
T Get(Boolean includeDisabled = False) Find component on this gameobject
T GetOrCreate(FindMode flags = 7) Find this component, if it doesn't exist - create it.
T GetInAncestorsOrSelf(Boolean includeDisabled = False) Find component on this gameobject's ancestors or on self
T GetInAncestors(Boolean includeDisabled = False) Find component on this gameobject's ancestors
T GetInDescendantsOrSelf(Boolean includeDisabled = False) Find component on this gameobject's decendants or on self
T GetInDescendants(Boolean includeDisabled = False) Find component on this gameobject's decendants
T GetInChildrenOrSelf(Boolean includeDisabled = False) Find component on this gameobject's immediate children or on self
T GetInChildren(Boolean includeDisabled = False) Find component on this gameobject's immediate children
T GetInParentOrSelf(Boolean includeDisabled = False) Find component on this gameobject's parent or on self
T GetInParent(Boolean includeDisabled = False) Find component on this gameobject's parent
Component Get(Guid id) Find component on this gameobject with the specified id