# Matches(Entity)

> Returns true if the entity matches the query, false if it does not.

## Definition

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

```csharp
public bool Matches(Entity e)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity to check for match

### Returns

| Type                                                          | Description                                                  |
| ------------------------------------------------------------- | ------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the entity is matched by the query, or false if not. |

### Remarks

This function will automatically block on any running jobs writing to component data that would affect the results of the check. For a non-blocking variant that ignores any query filtering, see [EntityQuery.MatchesIgnoreFilter](/engine/7000.0/script-reference/unity/entities/entityquery/matchesignorefilter.md).

This function creates a [EntityQueryMask](/engine/7000.0/script-reference/unity/entities/entityquerymask.md), if one does not exist for this query already. A maximum of 1024 EntityQueryMasks can be allocated per World.

Additional Resources: [EntityQuery.MatchesIgnoreFilter](/engine/7000.0/script-reference/unity/entities/entityquery/matchesignorefilter.md)
