Summary
Performs a breadth first search of the entity and it's children for a component of the specified type.
Syntax
public static T GetComponentInChildrenAndSelf<T>(this Entity entity, bool includeDisabled = false)
where T : ActivableEntityComponent
Type Parameters
| Name |
Description |
| T |
The type of component. |
Parameters
| Name |
Type |
Description |
| entity |
Entity |
The entity. |
| includeDisabled |
bool |
Should search include ActivableEntityComponent where ActivableEntityComponent.Enabled is false. |
Return Value
| Type |
Description |
| T |
The component or null if does no exist. |