文档

Unity Engine

Unity Engine

SetSingleton<T>(T)

Sets the value of a singleton component.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
警告
Deprecated. Use SystemAPI.SetSingleton instead (RemovedAfter Entities 1.0)
public void SetSingleton<T>(T value) where T : unmanaged, IComponentData

Parameters

value

T
A component containing the value to assign to the singleton.

Remarks

Additional Resources: EntityQuery.SetSingleton