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

    Struct Text2DAutoFit

    When added to an entity with a Text2DRenderer component, auto-fits the text. For Text2DAutofit to work, you must also add a RectTransformFinalSize component to the entity.

    Namespace: Unity.Tiny.Text
    Syntax
    public struct Text2DAutoFit : IComponentData

    Fields

    maxSize

    The maximum font size.

    Declaration
    public float maxSize
    Field Value
    Type Description
    System.Single

    minSize

    The minimum font size. If the font size computed at runtime to fit in the RectTransform is below this value, the text does not render.

    Declaration
    public float minSize
    Field Value
    Type Description
    System.Single
    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