# HasSingleton<T>()

> Checks whether a singleton component of the specified type exists.

## Definition

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

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

```csharp
public bool HasSingleton<T>()
```

### Returns

| Type                                                          | Description                                                                                                                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True, if a singleton of the specified type exists in the current [ComponentSystemBase.World](/engine/7000.0/script-reference/unity/entities/componentsystembase/world.md). |
