EntityComponentSearchExtensions.

GetComponentsInChildrenAndSelf<T>(Entity) Method

Summary

Performs a depth first search of the entity and it's children for all components of the specified type.

Syntax

public static IEnumerable<T> GetComponentsInChildrenAndSelf<T>(this Entity entity) 
    where T : EntityComponent

Type Parameters

Name Description
T The type of component.

Parameters

Name Type Description
entity Entity The entity.

Return Value

Type Description
IEnumerable<T> An iteration on the components.