Entity.FindComponentsOfTypeInHierarchy(ObjectType, Int32) Method

Definition

Traverses the entity's sub graph (including this entity) and returns a list of all components of certain type found in the graph.

public:
 System::Collections::Generic::IReadOnlyList<Microsoft::Azure::RemoteRendering::ComponentBase ^> ^ FindComponentsOfTypeInHierarchy(Microsoft::Azure::RemoteRendering::ObjectType type, int maxResultCount);
public System.Collections.Generic.IReadOnlyList<Microsoft.Azure.RemoteRendering.ComponentBase> FindComponentsOfTypeInHierarchy (Microsoft.Azure.RemoteRendering.ObjectType type, int maxResultCount);
member this.FindComponentsOfTypeInHierarchy : Microsoft.Azure.RemoteRendering.ObjectType * int -> System.Collections.Generic.IReadOnlyList<Microsoft.Azure.RemoteRendering.ComponentBase>
Public Function FindComponentsOfTypeInHierarchy (type As ObjectType, maxResultCount As Integer) As IReadOnlyList(Of ComponentBase)

Parameters

type
ObjectType

The component type to search for, for instance MeshComponent.

maxResultCount
Int32

If larger than 0, this value specifies the maximum number of returned elements. For negative values or 0, no size limit is imposed.

Returns

The array of found elements, or an empty array.

Remarks

If you only need the first result, then maxResultCount should be set to 1, so the search function can return early.

Applies to