docs.unity.cn
    Show / Hide Table of Contents

    Class FontUpdateTracker

    Utility class that is used to help with Text update.

    Inheritance
    Object
    FontUpdateTracker
    Namespace: UnityEngine.UI
    Syntax
    public static class FontUpdateTracker
    Remarks

    When Unity rebuilds a font atlas a callback is sent to the font. Using this class you can register your text as needing to be rebuilt if the font atlas is updated.

    Methods

    TrackText(Text)

    Register a Text element for receiving texture atlas rebuild calls.

    Declaration
    public static void TrackText(Text t)
    Parameters
    Type Name Description
    Text t

    The Text object to track

    UntrackText(Text)

    Deregister a Text element from receiving texture atlas rebuild calls.

    Declaration
    public static void UntrackText(Text t)
    Parameters
    Type Name Description
    Text t

    The Text object to no longer track

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 12 June 2023