Enum UIScaleMode | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Enum UIScaleMode

    Determines how UI elements in the Canvas are scaled.

    Namespace: Unity.Tiny.UILayout
    Syntax
    public enum UIScaleMode

    Fields

    Name Description
    ConstantPixelSize

    In Constant Pixel Size mode, you specify UI element positions and sizes in pixels on the screen.

    In practical terms, this means that elements retain the same size, in pixels, regardless of screen size.

    ScaleWithScreenSize

    In Scale With Screen Size mode, the Canvas has a specified reference resolution and you specify UI element positions and sizes in pixels within that resolution.

    If the screen resolution is different from the the Canvas resolution, the Canvas scales up or down, as needed, to fit the screen.

    In practical terms, this means that UI elements get bigger as the screen gets bigger, and vice versa.

    Extension Methods

    UnityUILayoutConversionExtensions.Convert()
    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