SuperBehaviour SuperBehaviour
SuperBehaviour SuperBehaviour
v0.1.2 [Beta]

Search Results for

    Class SuperRectTransform

    Namespace
    LoM.Super
    Assembly
    LoM.Super.dll

    Represents a UGUI RectTransform
    This class is used to simplify the access to the RectTransform of a UGUI GameObject, it provides a more intuitive way to access the RectTransform properties as they behave exactly like in the Inspector.


    To use the SuperRectTransform, simply cast the RectTransform to a SuperRectTransform and or use the AsSuperRectTransform extension method.
    // Stretch All
    SuperRectTransform transform = GetComponent<RectTransform>();
    transform.Left = 10;
    transform.Right = 10;
    transform.Bottom = 10;
    transform.Top = 10;
    

    // Center SuperRectTransform transform = GetComponent<RectTransform>(); transform.PosX = 10; transform.PosY = 10; transform.Width = 100; transform.Height = 100;


    public class SuperRectTransform
    Inheritance
    object
    SuperRectTransform

    Constructors

    SuperRectTransform(RectTransform)

    Represents a UGUI RectTransform with StretchAll Anchors

    public SuperRectTransform(RectTransform rectTransform)

    Parameters

    rectTransform RectTransform

    The RectTransform to initialize with

    Properties

    Anchor

    Anchor Preset of the RectTransform

    public UGUIAnchor Anchor { get; set; }

    Property Value

    UGUIAnchor

    Bottom

    Distance from the bottom edge of the parent RectTransform

    public float Bottom { get; set; }

    Property Value

    float

    Height

    Height of the RectTransform

    public float Height { get; set; }

    Property Value

    float

    Left

    Distance from the left edge of the parent RectTransform

    public float Left { get; set; }

    Property Value

    float

    ParentRect

    Parent RectTransform of the RectTransform

    public RectTransform ParentRect { get; }

    Property Value

    RectTransform

    Pivot

    Pivot of the RectTransform

    public Vector2 Pivot { get; set; }

    Property Value

    Vector2

    PosX

    X-Position of the RectTransform

    public float PosX { get; set; }

    Property Value

    float

    PosY

    Y-Position of the RectTransform

    public float PosY { get; set; }

    Property Value

    float

    PosZ

    Z-Position of the RectTransform

    public float PosZ { get; set; }

    Property Value

    float

    Right

    Distance from the right edge of the parent RectTransform

    public float Right { get; set; }

    Property Value

    float

    Top

    Distance from the top edge of the parent RectTransform

    public float Top { get; set; }

    Property Value

    float

    Width

    Width of the RectTransform

    public float Width { get; set; }

    Property Value

    float

    Methods

    ToString()

    public override string ToString()

    Returns

    string

    Operators

    implicit operator RectTransform(SuperRectTransform)

    public static implicit operator RectTransform(SuperRectTransform superRectTransform)

    Parameters

    superRectTransform SuperRectTransform

    Returns

    RectTransform

    implicit operator SuperRectTransform(RectTransform)

    public static implicit operator SuperRectTransform(RectTransform rectTransform)

    Parameters

    rectTransform RectTransform

    Returns

    SuperRectTransform
    © Lords of Mahlstrom Gaming, all rights reserved.