Method GetSingleton
GetSingleton<T>()
Gets the value of a singleton component.
Declaration
public static T GetSingleton<T>() where T : unmanaged, IComponentData
Returns
| Type | Description |
|---|---|
| T | The component. |
Type Parameters
| Name | Description |
|---|---|
| T | The Unity.Entities.IComponentData subtype of the singleton component. This component type must not implement Unity.Entities.IEnableableComponent |
Remarks
Not working in IJobEntity or utility methods
See Also
GetSingletonRW<T>()
GetSingleton<T>()
GetSingletonRW<T>()