logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityUiTMP_TextLocalizationUpdaterComponent

    Unity component that manages TextMeshPro text localization using Unity's Localization system.
    Automatically updates localized strings based on current text content and provides manual refresh capabilities.
    Integrates with Unity Localization package to provide dynamic text translation for UI elements.

    Inheritance
    object
    UnityUiTMP_TextLocalizationUpdaterComponent
    Namespace: Serenity.Ui.Infrastructure.Components
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityUiTMP_TextLocalizationUpdaterComponent : MonoBehaviour

    Constructors

    UnityUiTMP_TextLocalizationUpdaterComponent()

    Declaration
    public UnityUiTMP_TextLocalizationUpdaterComponent()

    Methods

    GetText()

    Provides access to the associated TextMeshPro text component.
    Returns the text component used for displaying localized content.

    Declaration
    public TMP_Text GetText()
    Returns
    Type Description
    TMP_Text

    The TMP_Text component managed by this localization updater

    SetTranslateOnStart(bool)

    Sets whether to perform initial localization on component start.
    Allows external configuration of translation behavior before the Start lifecycle method executes.
    Must be called before Start() to affect initial localization behavior.

    Declaration
    public void SetTranslateOnStart(bool translateOnStart)
    Parameters
    Type Name Description
    bool translateOnStart

    True to enable translation on start, false to disable

    UpdateLocalization()

    Updates the localization settings and refreshes the displayed text.
    Sets the current text content as the localization table entry reference and triggers string refresh.
    Uses the Global localization table for text resolution.

    Declaration
    public void UpdateLocalization()
    In this article
    © 2026 Serenity. All Rights Reserved