The ComponentList class in the Sandbox
namespace is a collection that manages 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 a collection that manages 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 | Perform an action on each component. |
Move | Move the position of the component in the list by delta. |
GetOrCreate | Find this component, if it doesn't exist - create it. |
GetInAncestorsOrSelf | Find component on this gameobject's ancestors or on self. |
GetInAncestors | Find component on this gameobject's ancestors. |
GetInDescendantsOrSelf | Find component on this gameobject's descendants or on self. |
GetInDescendants | Find component on this gameobject's descendants. |
GetInChildrenOrSelf | Find component on this gameobject's immediate children or on self. |
GetInChildren | Find component on this gameobject's immediate children. |
GetInParentOrSelf | Find component on this gameobject's parent or on self. |
GetInParent | Find component on this gameobject's parent. |
Get | Find component on this gameobject with the specified id. |
Count | Amount of components - including disabled. |