| Parameter | Description |
|---|---|
| child | The entity whose parent should be changed. |
| newParent | The new parent entity for child. If this value is Entity.Null,
child will have no parent and will become the root of a new hierarchy. |
| preserveWorldTransform |
If true, the world-space transform of child will be preserved as closely as possible by
setting its Unity.Transforms.LocalTransform component to match its current world-space transform. Slight
differences are still possible due to floating-point rounding.If false, child's Unity.Transforms.LocalTransform components will not be modified. However, the existing
value will now be relative to world-space instead to its previous parent; this may cause a significant
instantaneous change in its world-space transform.
|
Establish a new link between a child and parent entity.
This function must not be used from an ExclusiveEntityTransaction context. Manipulating transform hierarchies from worker threads is not safe.