Struct RectTransform | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct RectTransform

    Defines the position, size, anchor and pivot information for a rectangle.

    Namespace: Unity.Tiny.UILayout
    Syntax
    public struct RectTransform : IComponentData

    Fields

    anchoredPosition

    The position of this RectTransform's pivot of relative to the anchor reference point.

    Declaration
    public float2 anchoredPosition
    Field Value
    Type Description
    float2

    anchorMax

    The normalized position in the parent RectTransform that the upper right corner of the rectangle is anchored to.

    Declaration
    public float2 anchorMax
    Field Value
    Type Description
    float2

    anchorMin

    The normalized position in the parent RectTransform that the lower left corner of the rectangle is anchored to.

    Declaration
    public float2 anchorMin
    Field Value
    Type Description
    float2

    pivot

    The normalized position in this RectTransform that it rotates around.

    Declaration
    public float2 pivot
    Field Value
    Type Description
    float2

    sizeDelta

    The size of this RectTransform relative to the distances between the anchors. If the anchors are together, sizeDelta is the same as size. If the anchors are in each of the four corners of the parent, the sizeDelta is how much bigger or smaller the rectangle is compared to its parent.

    Declaration
    public float2 sizeDelta
    Field Value
    Type Description
    float2

    Properties

    Default

    Declaration
    public static RectTransform Default { get; }
    Property Value
    Type Description
    RectTransform

    offsetMax

    Declaration
    public float2 offsetMax { get; set; }
    Property Value
    Type Description
    float2

    offsetMin

    Declaration
    public float2 offsetMin { get; set; }
    Property Value
    Type Description
    float2
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023