Documentation

Unity Engine


Unity Engine


GetSingletonBuffer<T>(bool)

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

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public static DynamicBuffer<T> GetSingletonBuffer<T>(bool isReadOnly = false) where T : unmanaged, IBufferElementData

Parameters

isReadOnly

Whether the buffer data is only read or is also written. Access data in a read-only fashion whenever possible.

Returns

Type

Description

DynamicBuffer<T>The buffer.

Remarks

Not working in Entities.ForEach, IJobEntity, and Utility methods
Additional Resources: EntityQuery.GetSingleton