AddBuffer<T>()
Adds a Buffer of T elements, an IBufferElementData, to this GameObject.
Read time 1 minuteLast updated 6 hours ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public DynamicBuffer<T> AddBuffer<T>() where T : unmanaged, IBufferElementData
Returns
Type | Description |
|---|---|
| DynamicBuffer<T> | The Buffer. If the GameObject already had the Buffer, the existing Buffer. |
Remarks
Throws an if the GameObject has been destroyed.
ArgumentExceptionThis is a structural change: it waits for all jobs in the World to complete. To make it from a job or a system without waiting, record it in a instead.
Unity.Entities.EntityCommandBuffer