docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ParentSystem

    This system maintains parent/child relationships between entities within a transform hierarchy.

    Implements
    ISystem
    Namespace: Unity.Transforms
    Assembly: Unity.Transforms.dll
    Syntax
    [BurstCompile]
    [RequireMatchingQueriesForUpdate]
    [WorldSystemFilter(WorldSystemFilterFlags.Default|WorldSystemFilterFlags.Editor, WorldSystemFilterFlags.Default)]
    [UpdateInGroup(typeof(TransformSystemGroup))]
    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)
    OnCreateForCompiler(ref SystemState)
    OnUpdate(ref SystemState)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)