docs.unity.cn
    Show / Hide Table of Contents

    Struct LocalToWorldSystem

    This system computes a LocalToWorld matrix for each entity

    Namespace: Unity.Transforms
    Syntax
    [BurstCompile]
    [WorldSystemFilter(WorldSystemFilterFlags.Default | WorldSystemFilterFlags.Editor, WorldSystemFilterFlags.Default)]
    [UpdateInGroup(typeof(TransformSystemGroup))]
    [UpdateAfter(typeof(ParentSystem))]
    public struct LocalToWorldSystem : ISystem
    Remarks

    Entity transformation hierarchies are created using the Parent and LocalTransform components, and maintained by the ParentSystem.

    For root-level / world-space entities with no Parent, the LocalToWorld can be computed directly from the entity's LocalTransform.

    For child entities, each unique hierarchy is traversed recursively, computing each child's LocalToWorld by composing its LocalTransform with its parent's world-space transform.

    Methods

    Name Description
    OnCreate(ref SystemState)

    Called when this system is created.

    OnUpdate(ref SystemState)

    Called when this system is destroyed.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023