logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityLabel

    Reusable themed text label. Wraps a TMP_Text instantiated from the active theme's TitleTemplate prefab, so it inherits the theme's font/styling. Drive it with SetText(string). Created via CreateLabel(Transform, string, float).

    Inheritance
    object
    SerenityLabel
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Ui.Infrastructure.Widgets
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public sealed class SerenityLabel

    Constructors

    SerenityLabel(GameObject, TMP_Text)

    Declaration
    public SerenityLabel(GameObject root, TMP_Text tmp)
    Parameters
    Type Name Description
    GameObject root
    TMP_Text tmp

    Properties

    GameObject

    Declaration
    public GameObject GameObject { get; }
    Property Value
    Type Description
    GameObject

    Methods

    SetActive(bool)

    Declaration
    public void SetActive(bool on)
    Parameters
    Type Name Description
    bool on

    SetAlignment(TextAlignmentOptions)

    Declaration
    public void SetAlignment(TextAlignmentOptions alignment)
    Parameters
    Type Name Description
    TextAlignmentOptions alignment

    SetColor(Color)

    Declaration
    public void SetColor(Color color)
    Parameters
    Type Name Description
    Color color

    SetFontSize(float)

    Declaration
    public void SetFontSize(float size)
    Parameters
    Type Name Description
    float size

    SetText(string)

    Declaration
    public void SetText(string text)
    Parameters
    Type Name Description
    string text
    In this article
    © 2026 Serenity. All Rights Reserved