docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct LocalToWorldSystem

    This system computes a LocalToWorld matrix for each entity

    Implements
    ISystem
    Namespace: Unity.Transforms
    Assembly: Unity.Transforms.dll
    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.

    OnCreateForCompiler(ref SystemState)

    Generated by compilation pipeline and used internally.

    OnUpdate(ref SystemState)

    Called when this system is destroyed.

    In This Article
    Back to top
    Copyright © 2024 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)