AppendToBuffer<T>(Entity, T)
Records a command to append a single element to the end of a dynamic buffer component.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public void AppendToBuffer<T>(Entity e, T element) where T : struct, IBufferElementData
Parameters
The entity to which the dynamic buffer belongs.
The new element to add to the DynamicBuffer<T> component.
Remarks
At playback this command throws an error if the entity is destroyed before playback, or if the entity doesn't have a DynamicBuffer<T> component that stores elements of type T.