Struct RectTransform | Project Tiny | 0.32.0-preview.54
docs.unity3d.com
    Show / Hide Table of Contents

    Struct RectTransform

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

    Fields

    AnchoredPosition

    The position in the parent RectTransform relative to the corresponding X or Y anchor's position. If the min and max coordinate of the anchor direction is the same, then the AnchoredPosition determines the offset from the parent's corresponding anchor position to the Pivot, and the SizeDelta determines the size in that direction (centered on the pivot).

    Declaration
    public float2 AnchoredPosition
    Field Value
    Type Description
    float2

    AnchorMax

    The normalized position in the parent RectTransform or UICanvas's space of the upper-right corner of the rectangle.

    Declaration
    public float2 AnchorMax
    Field Value
    Type Description
    float2

    AnchorMin

    The normalized position in the parent RectTransform or UICanvas's space of the lower-left corner of the rectangle.

    Declaration
    public float2 AnchorMin
    Field Value
    Type Description
    float2

    Pivot

    The point around which this RectTransform rotates and expands outwards in size from, defined as a normalized coordinate of the rectangle itself. 0,0 is the lower-left corner, while 1,1 is the upper-right corner.

    Declaration
    public float2 Pivot
    Field Value
    Type Description
    float2

    SiblingIndex

    Declaration
    public int SiblingIndex
    Field Value
    Type Description
    Int32

    SizeDelta

    The size of this RectTransform relative to the distances between the anchors. If the anchors are together, the SizeDelta is the element's exact size.

    If the anchors are separated, the SizeDelta is the delta from the size of anchor rectangle (i.e. negative if it is contained within the anchor rectangle). The SizeDelta and AnchoredPosition work together to determine the final size of the Rect.

    Declaration
    public float2 SizeDelta
    Field Value
    Type Description
    float2

    Properties

    Hidden

    Declaration
    public bool Hidden { get; set; }
    Property Value
    Type Description
    Boolean
    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