| Parameter | Description |
|---|---|
| e | The entity prefab. |
Entity The root entity of the instantiated prefab.
Records a command to create an entity with specified entity prefab.
An instantiated entity has the same components and component values as the
prefab entity, minus the Prefab tag component.
If the source entity was destroyed before playback, this command throws an error.
The returned entity is the root of the instantiated prefab. It is valid for use in
subsequent commands on this buffer, but has no chunk until the ECB has been played back EntityCommandBuffer.Playback.
For a prefab with a LinkedEntityGroup, only the root is allocated at record
time. The child entity IDs are only available via the root's LinkedEntityGroup
buffer after playback.
| Parameter | Description |
|---|---|
| e | The entity prefab. |
| entities | A NativeArray that receives the root entities of the instantiated prefabs. |
Records a command to create a NativeArray of entities with specified entity prefab.
An instantiated entity has the same components and component values as the prefab entity, minus the Prefab tag component.
If the source entity was destroyed before playback, this command throws an error.
The filled entities are the roots of each instantiated prefab. They are valid for use
in subsequent commands on this buffer, but have no chunk until the ECB has been played back EntityCommandBuffer.Playback.
For a prefab with a LinkedEntityGroup, only the roots are allocated at record
time. The child entity IDs are only available via each root's LinkedEntityGroup
buffer after playback.