# TryGetSingletonEntity<T>(out Entity)

> Gets the singleton Entity, and returns whether or not a singleton Entity of the specified type exists in the World.

## Definition

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

## TryGetSingletonEntity\<T>(Entity)

```csharp
public bool TryGetSingletonEntity<T>(out Entity value)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The [Entity](/engine/7000.0/script-reference/unity/entities/entity.md) associated with the specified singleton component. If a singleton of the specified types does not exist in the current [World](/engine/7000.0/script-reference/unity/entities/world.md), this is set to Entity.Null

### Returns

| Type                                                          | Description                                                                                                                                                                                                        |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True, if exactly one [Entity](/engine/7000.0/script-reference/unity/entities/entity.md) matches the [EntityQuery](/engine/7000.0/script-reference/unity/entities/entityquery.md) with the provided component type. |
