# Children

> Selects all direct child elements of elements matching the previous rules.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## Children\<T>(string, string\[])

Selects all direct child elements of elements matching the previous rules.

```csharp
public UQueryBuilder<T2> Children<T2>(string name = null, params string[] classes) where T2 : VisualElement
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

| Type                                                                                          | Description |
| --------------------------------------------------------------------------------------------- | ----------- |
| [UQueryBuilder\<T>](/engine/6000.0/script-reference/unityengine/uielements/uquerybuilder1.md) |             |

## Children\<T>(string, string)

Selects all direct child elements of elements matching the previous rules.

```csharp
public UQueryBuilder<T2> Children<T2>(string name = null, string className = null) where T2 : VisualElement
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Returns

| Type                                                                                          | Description |
| --------------------------------------------------------------------------------------------- | ----------- |
| [UQueryBuilder\<T>](/engine/6000.0/script-reference/unityengine/uielements/uquerybuilder1.md) |             |
