Struct ParentSystem
This system maintains parent/child relationships between entities within a transform hierarchy.
Implements
Namespace: Unity.Transforms
Assembly: solution.dll
Syntax
[WorldSystemFilter(WorldSystemFilterFlags.Default|WorldSystemFilterFlags.Editor, WorldSystemFilterFlags.Default)]
[UpdateInGroup(typeof(TransformSystemGroup))]
[BurstCompile]
public struct ParentSystem : ISystem
Remarks
The system guarantees the following invariants after each update:
- If an entity has the Parent component, it refers to a valid entity.
- If an entity has the Parent component, the specified parent entity must have a Child buffer component, and this entity must be an element of that buffer.
- If an entity has the Parent component, it also has the PreviousParent component which refers to the same valid entity.
- If an entity does not have the Parent component, it is not a member of any entity's Child buffer.
- If an entity does not have the Parent component, it does not have the PreviousParent component.
Methods
Name | Description |
---|---|
OnCreate(ref SystemState) | Called when this system is created. |
OnUpdate(ref SystemState) | Implement |