Pular para o conteúdo
AstraDOCS

Astra.Components.ComponentQueries

Astra atual · C# · 06 out. 2026Referência de assinaturas

Queries over real native component instances; ordinal order is preserved. Unity 6000.0 GetComponentsInChildren/GetComponentsInParent are the reference contracts.

Namespace: Astra.Components · Assembly: Astra.Scripting · Tipo: Class

class Astra.Components.ComponentQueries

Queries over real native component instances; ordinal order is preserved. Unity 6000.0 GetComponentsInChildren/GetComponentsInParent are the reference contracts.

Membro Categoria
GetComponentsInChildren Method
GetComponentsInChildren Method
GetComponentsInParent Method
GetComponents Method
GetComponents Method
TryGetComponent Method

GetComponentsInChildren

public static T[] GetComponentsInChildren<T>(Astra.GameObject owner, bool includeInactive = false) where T : struct, Astra.Components.IComponentFacade<T>
Parâmetro Tipo Contrato
owner Astra.GameObject
includeInactive bool · Opcional: False

GetComponentsInChildren

public static void GetComponentsInChildren<T>(Astra.GameObject owner, bool includeInactive, System.Collections.Generic.List<T> results) where T : struct, Astra.Components.IComponentFacade<T>

Depth-first, self first, child order preserved. Self is searched even when inactive; inactive descendants are excluded by default. Disabled components remain discoverable.

Parâmetro Tipo Contrato
owner Astra.GameObject
includeInactive bool
results System.Collections.Generic.List&lt;T&gt;

GetComponentsInParent

public static T[] GetComponentsInParent<T>(Astra.GameObject owner, bool includeInactive = false) where T : struct, Astra.Components.IComponentFacade<T>
Parâmetro Tipo Contrato
owner Astra.GameObject
includeInactive bool · Opcional: False

GetComponents

public static T[] GetComponents<T>(Astra.GameObject owner) where T : struct, Astra.Components.IComponentFacade<T>
Parâmetro Tipo Contrato
owner Astra.GameObject

GetComponents

public static void GetComponents<T>(Astra.GameObject owner, System.Collections.Generic.List<T> results) where T : struct, Astra.Components.IComponentFacade<T>

Writes into caller-owned storage without allocating a result array.

Parâmetro Tipo Contrato
owner Astra.GameObject
results System.Collections.Generic.List&lt;T&gt;

TryGetComponent

public static bool TryGetComponent<T>(Astra.GameObject owner, out T component) where T : struct, Astra.Components.IComponentFacade<T>
Parâmetro Tipo Contrato
owner Astra.GameObject
component T · Out