---
title: "Astra.Components.ComponentQueries"
version: snapshot-2026-10-06
engineGeneration: astra-current
language: C#
status: semantic-reference
runtimeVerified: false
platformEvidence: []
url: https://astraengine.com.br/pt-br/snapshot-2026-10-06/api/astra-components-componentqueries/
---
# Astra.Components.ComponentQueries
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
:::note[Sobre esta referência]
Assinaturas extraídas semanticamente com Roslyn/MSBuild. Isso confirma a superfície do código deste snapshot; não comprova execução no Android. As descrições vêm dos comentários da API. Membros sem explicação ainda exigem revisão editorial.
:::
## Declaração
```csharp
class Astra.Components.ComponentQueries
```
Queries over real native component instances; ordinal order is preserved. Unity 6000.0 GetComponentsInChildren/GetComponentsInParent are the reference contracts.
## Membros
| Membro | Categoria |
|---|---|
| [GetComponentsInChildren](#member-45108e918bb3bf7a) | Method |
| [GetComponentsInChildren](#member-e47464d52b4e5625) | Method |
| [GetComponentsInParent](#member-dfa9096a1caf64f4) | Method |
| [GetComponents](#member-275806c5c87462a4) | Method |
| [GetComponents](#member-5249e5a09a3b452b) | Method |
| [TryGetComponent](#member-ebaee0f791e4a617) | Method |
GetComponentsInChildren
```csharp
public static T[] GetComponentsInChildren(Astra.GameObject owner, bool includeInactive = false) where T : struct, Astra.Components.IComponentFacade
```
| Parâmetro | Tipo | Contrato |
|---|---|---|
| `owner` | `Astra.GameObject` | |
| `includeInactive` | `bool` | · Opcional: `False` |
GetComponentsInChildren
```csharp
public static void GetComponentsInChildren(Astra.GameObject owner, bool includeInactive, System.Collections.Generic.List results) where T : struct, Astra.Components.IComponentFacade
```
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<T>` | |
GetComponentsInParent
```csharp
public static T[] GetComponentsInParent(Astra.GameObject owner, bool includeInactive = false) where T : struct, Astra.Components.IComponentFacade
```
| Parâmetro | Tipo | Contrato |
|---|---|---|
| `owner` | `Astra.GameObject` | |
| `includeInactive` | `bool` | · Opcional: `False` |
GetComponents
```csharp
public static T[] GetComponents(Astra.GameObject owner) where T : struct, Astra.Components.IComponentFacade
```
| Parâmetro | Tipo | Contrato |
|---|---|---|
| `owner` | `Astra.GameObject` | |
GetComponents
```csharp
public static void GetComponents(Astra.GameObject owner, System.Collections.Generic.List results) where T : struct, Astra.Components.IComponentFacade
```
Writes into caller-owned storage without allocating a result array.
| Parâmetro | Tipo | Contrato |
|---|---|---|
| `owner` | `Astra.GameObject` | |
| `results` | `System.Collections.Generic.List<T>` | |
TryGetComponent
```csharp
public static bool TryGetComponent(Astra.GameObject owner, out T component) where T : struct, Astra.Components.IComponentFacade
```
| Parâmetro | Tipo | Contrato |
|---|---|---|
| `owner` | `Astra.GameObject` | |
| `component` | `T` | · Out |