Method CreateAdditionalEntity
CreateAdditionalEntity()
Creates an additional Entity tied to the primary entity.
Declaration
[Obsolete("Use the version of the function with the explicit Entity parameter (RemovedAfter Entities 1.0)")]
public Entity CreateAdditionalEntity()
Returns
Type | Description |
---|---|
Entity | Returns the newly created entity. |
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.
Implicitly it will create the additional entity with TransformUsageFlags.Dynamic.
Baking only additional entities are not exported in the runtime data.
CreateAdditionalEntity(TransformUsageFlags, bool, string)
Creates an additional Entity tied to the primary entity.
Declaration
public Entity CreateAdditionalEntity(TransformUsageFlags transformUsageFlags, bool bakingOnlyEntity = false, string entityName = "")
Parameters
Type | Name | Description |
---|---|---|
TransformUsageFlags | transformUsageFlags | The TransformUsageFlags of the additional Entity. |
bool | bakingOnlyEntity | Whether to mark the additional Entity as BakingOnly. |
string | entityName | The name of the additional Entity. |
Returns
Type | Description |
---|---|
Entity | Returns the newly created entity. |
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.