# GetSingletonEntity<T>()

> Gets the Entity instance for a singleton.

## Definition

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

```csharp
public static Entity GetSingletonEntity<T>() where T : unmanaged
```

### Returns

| Type                                                               | Description                                                   |
| ------------------------------------------------------------------ | ------------------------------------------------------------- |
| [Entity](/engine/7000.0/script-reference/unity/entities/entity.md) | The entity associated with the specified singleton component. |

### Remarks

Not working in Entities.ForEach, IJobEntity, and Utility methods

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