| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| e | The entity to have the component added. |
| component | The value to add on the new component in playback for the entity. |
Records a command to add component of type T to an entity.
At playback, if the entity already has this type of component, the value will just be set. Will throw an error if this entity is destroyed before playback, if T is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| entities | The NativeArray of entities to have the component added. |
| component | The value to add on the new component in playback for all entities in the NativeArray. |
Records a command to add component of type T to a NativeArray of entities.
At playback, if any entity already has this type of component, the value will just be set. Will throw an error if any entity is destroyed before playback, if T is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| e | The entity to have the component added. |
Records a command to add component of type T to an entity.
At playback, this command will do nothing if the entity already has the component. Will throw an error if this entity is destroyed before playback, if T is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| entities | The NativeArray of entities to have the component added. |
Records a command to add component of type T to a NativeArray of entities.
At playback, if an entity already has this component, it will be skipped. Will throw an error if any entity is destroyed before playback, if T is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| e | The entity to get the additional component. |
| componentType | The type of component to add. |
Records a command to add a component to an entity.
At playback, this command will do nothing if the entity already has the component. Will throw an error if this entity is destroyed before playback, if component type is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| entities | The NativeArray of entities to have the component added. |
| componentType | The type of component to add. |
Records a command to add a component to a NativeArray of entities.
At playback, if an entity already has this component, it will be skipped. Will throw an error if any entity is destroyed before playback, if component type is type Entity or Prefab, or adding this componentType makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| e | The entity to get additional components. |
| typeSet | The types of components to add. |
Records a command to add one or more components to an entity.
At playback, it's not an error to include a component type that the entity already has. Will throw an error if this entity is destroyed before playback, if any component type is type Entity or Prefab, or adding a component type makes the archetype too large.
| Parameter | Description |
|---|---|
| sortKey | A unique index for each set of commands added to this EntityCommandBuffer across all parallel jobs writing commands to this buffer. The ChunkIndexInQuery provided by IJobEntity is an appropriate value to use for this parameter. In an IJobChunk pass the 'unfilteredChunkIndex' value from IJobChunk.Execute. |
| entities | The NativeArray of entities to have the components added. |
| typeSet | The types of components to add. |
Records a command to add one or more components to a NativeArray of entities.
At playback, it's not an error to include a component type that any of the entities already have. Will throw an error if any entity is destroyed before playback, if any component type is type Entity or Prefab, or adding a component type makes the archetype too large.