# Build()

> Get or create an EntityQuery matching the query description(s).

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public EntityQuery Build()
```

### Returns

| Type                                                                         | Description |
| ---------------------------------------------------------------------------- | ----------- |
| [EntityQuery](/engine/7000.0/script-reference/unity/entities/entityquery.md) | The query   |

### Remarks

If an `EntityQuery` in the containing system's existing cache matches the defined query, it gets retrieved. Otherwise, a new `EntityQuery` is created and then added to the containing system's cache.
