# SetSingleton<T>(T)

> Sets the value of a singleton component.

## Definition

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

```csharp
public static void SetSingleton<T>(T value) where T : unmanaged, IComponentData
```

### Parameters

**** (T): A component containing the value to assign to the singleton.

### Remarks

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

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