Method CreateAdditionalEntities
CreateAdditionalEntities(NativeArray<Entity>, TransformUsageFlags, bool)
Creates an array of additional Entities tied to the primary entity.
Declaration
public void CreateAdditionalEntities(NativeArray<Entity> outputEntities, TransformUsageFlags transformUsageFlags, bool bakingOnlyEntity = false)
Parameters
Type | Name | Description |
---|---|---|
Native |
outputEntities | The output array which will be filled with the additional Entities created. The size of the array specifies the
number of additional entities to be created. The function throws Argument |
Transform |
transformUsageFlags | The Transform |
bool | bakingOnlyEntity | Whether to mark the additional Entity as BakingOnly. |
Remarks
Additional entities are automatically reverted by the baking system if the source primary entity is removed in a new baking pass. Additional entities are created with the same active or static state as the Primary Entity. For example, if the authoring object is disabled, the new additional entity will also have the Disabled tag component.
Baking only additional entities are not exported in the runtime data.