# GetSingleton<T>()

> Gets the value of a singleton component.

## Definition

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

> **Warning:**
>
> **Deprecated.** Use SystemAPI.GetSingleton instead (RemovedAfter Entities 1.0)

```csharp
public T GetSingleton<T>() where T : unmanaged, IComponentData
```

### Returns

| Type | Description    |
| ---- | -------------- |
| T    | The component. |

### Remarks

Additional Resources: [ComponentSystemBase.GetSingletonRW](/engine/7000.0/script-reference/unity/entities/componentsystembase/getsingletonrw.md), [EntityQuery.GetSingleton](/engine/7000.0/script-reference/unity/entities/entityquery/getsingleton.md), [EntityQuery.GetSingletonRW](/engine/7000.0/script-reference/unity/entities/entityquery/getsingletonrw.md)
