EntityComponentSearchExtensions.

GetComponentsInChildren<T>(Entity, bool) Method

Summary

Performs a depth first search of the entities children for all components of the specified type.

Syntax

public static IEnumerable<T> GetComponentsInChildren<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
IEnumerable<T> An iteration on the components.