The ComponentList class in the Sandbox namespace is responsible for managing a collection of components associated with a game object. It provides methods to add, retrieve, and manipulate components, including those that are disabled.
The ComponentList class in the Sandbox namespace is responsible for managing a collection of components associated with a game object. It provides methods to add, retrieve, and manipulate components, including those that are disabled.
Member Name | Summary |
---|---|
GetAll | Get all components, including disabled ones. |
Create | Add a component of this type. |
Get | Get a component of this type. |
TryGet | Try to get this component. |
FirstOrDefault | Allows LINQ style queries. |
ForEach | Iterate over each component and perform an action. |
Move | Move the position of the component in the list by delta (-1 means up one, 1 means down one). |
GetOrCreate | Find this component, if it doesn't exist - create it. |
GetInAncestorsOrSelf | Find component on this game object's ancestors or on self. |
GetInDescendantsOrSelf | Find component on this game object's descendants or on self. |
GetInChildrenOrSelf | Find component on this game object's immediate children or on self. |
GetInParentOrSelf | Find component on this game object's parent or on self. |
Count | Amount of components - including disabled. |