🤔

Baking Transform components#

The final transform components are driven by calls to GetEntity. GetEntity takes a TransformUsageFlags which defines which components are added to objects. If you manually add components, unless the provided flags are TransformUsageFlags.ManualOverride, they will be removed if they don't match the setup.

Resolution#

If you are missing a component, make sure you are using a TransformUsageFlags flag with GetEntity that will include it. Or use ManualOverride and manually add all the components you need.

Notes#

Table#

This table shows the outcome if you only specified a single TransformUsageFlags flag with one baker.

LocalTransform LocalToWorld PostTransformMatrix Parent Child
None
Renderable Has dynamic parent Has non-uniform scale
and has dynamic parent
Has dynamic parent Has dynamic child
Dynamic Has non-uniform scale Has dynamic parent Has dynamic child
WorldSpace Has dynamic child
NonUniformScale Has dynamic parent Has dynamic parent Has dynamic child
Note that static flags may override your flags and prefabs retrieved via GetEntity are given the Dynamic flag by default.

Combined flags#

Multiple bakers will combine their flags, specifying all that is needed, and in some cases this can be quite complicated.
For example if a Renderer with one submesh is present, then the transform will gain a Renderable tag. If there are multiple submeshes then additional entities will be generated, and the root entity will not get flagged as Renderable.