Class UILayoutService | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class UILayoutService

    Inheritance
    System.Object
    UILayoutService
    Namespace: Unity.Tiny.UILayout
    Syntax
    public static class UILayoutService

    Methods

    ComputeRectTransformSize(float2, float2, float2, float2)

    Calculates the dimensions of a RectTransform component using the supplied values.

    Declaration
    public static float2 ComputeRectTransformSize(float2 anchorMin, float2 anchorMax, float2 sizeDelta, float2 parentSize)
    Parameters
    Type Name Description
    float2 anchorMin
    float2 anchorMax
    float2 sizeDelta
    float2 parentSize
    Returns
    Type Description
    float2

    GetRectTransformSizeOfEntity(ComponentSystem, Entity)

    Gets the dimensions of a RectTransform component. This method assumes that entity has both a Transform component and a RectTransform component.

    Declaration
    public static float2 GetRectTransformSizeOfEntity(ComponentSystem sys, Entity entity)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity entity
    Returns
    Type Description
    float2

    GetRectTransformSizeOfParent(ComponentSystem, Entity)

    Returns the size of the childTransform's parent. If the childTransform doesn't have a parent, returns the screen size.

    Declaration
    public static float2 GetRectTransformSizeOfParent(ComponentSystem sys, Entity parent)
    Parameters
    Type Name Description
    ComponentSystem sys
    Entity parent
    Returns
    Type Description
    float2

    GetScreenSize(ComponentSystemBase)

    Declaration
    public static float2 GetScreenSize(ComponentSystemBase sys)
    Parameters
    Type Name Description
    ComponentSystemBase sys
    Returns
    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