Documentation

Unity Engine


Unity Engine


SetSingleton<T>(T)

Sets the value of a singleton component.
Read time 1 minuteLast updated a day ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public static void SetSingleton<T>(T value) where T : unmanaged, IComponentData

Parameters

value

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