GetSingleton<T>()
Gets the value of a singleton component.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public static T GetSingleton<T>() where T : unmanaged, IComponentData
Returns
Type | Description |
|---|---|
| T | The component. |
Remarks
Not working in Entities.ForEach, IJobEntity, and Utility methods
Additional Resources: ComponentSystemBase.GetSingletonRW, EntityQuery.GetSingleton, EntityQuery.GetSingletonRW