docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TransformRef

    Implements
    IQueryTypeParameter
    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    [NativeContainer]
    public readonly struct TransformRef : IQueryTypeParameter

    Properties

    Name Description
    IsValid
    LocalPosition
    LocalRotation
    LocalScale

    Methods

    Name Description
    ComputeLocalToWorld()
    GetLocalPositionAndRotation(out float3, out quaternion)

    Gets the local (parent-relative) position and rotation.

    GetWorldPositionAndRotation(out float3, out quaternion)

    Gets the world-space position and rotation.

    SetLocalPositionAndRotation(float3, quaternion)

    Sets the local (parent-relative) position and rotation to the provided values.

    SetLocalTransform(float3, quaternion, float3)

    Sets the local (parent-relative) position, rotation, and scale to the provided values.

    SetLocalTransform(float4x4)

    Sets the local (parent-relative) position, rotation, and scale to the values encoded in a 4x4 local-to-parent matrix.

    SetWorldPositionAndRotation(float3, quaternion)

    Sets the world-space position and rotation to the provided values.

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