Method AppendToBuffer
AppendToBuffer<T>(int, Entity, T)
Records a command to append a single element to the end of a dynamic buffer component.
Declaration
public void AppendToBuffer<T>(int sortKey, Entity e, T element) where T : struct, IBufferElementData
Parameters
Type | Name | Description |
---|---|---|
int | sortKey | A unique index for each set of commands added to this EntityCommandBuffer
across all parallel jobs writing commands to this buffer. The Chunk |
Entity | e | The entity to which the dynamic buffer belongs. |
T | element | The new element to add to the Dynamic |
Type Parameters
Name | Description |
---|---|
T | The IBuffer |
Remarks
At playback, this command throws an error if this entity is destroyed before playback,
if this entity is still deferred, or if the entity doesn't have a Dynamic
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if the entity does not have a Dynamic |
Null |
Throws if an Allocator was not passed in when the EntityCommandBuffer was created. |