logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SerenityStatusPanel

    Reusable composite that renders one gameplay entity's status from real Serenity widgets: a name SerenityLabel plus up to three SerenityGauges (e.g. HP / charge / limit). Built entirely at runtime via SerenityUiContext. Drive it with the Set* methods; SetHighlighted(bool) tints the panel for target selection.

    Inheritance
    object
    SerenityStatusPanel
    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 SerenityStatusPanel

    Properties

    GameObject

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

    Methods

    Create(SerenityUiContext, Transform, string, string, string, string, string, float)

    Builds a status panel under parent. hpLabel/btcLabel/ limitLabel are the gauge captions; pass null for btc/limit to omit those gauges.

    Declaration
    public static SerenityStatusPanel Create(SerenityUiContext ctx, Transform parent, string id, string displayName, string hpLabel, string btcLabel, string limitLabel, float preferredWidth = 280)
    Parameters
    Type Name Description
    SerenityUiContext ctx
    Transform parent
    string id
    string displayName
    string hpLabel
    string btcLabel
    string limitLabel
    float preferredWidth
    Returns
    Type Description
    SerenityStatusPanel

    SetActive(bool)

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

    SetBtc(float)

    Declaration
    public void SetBtc(float value01)
    Parameters
    Type Name Description
    float value01

    SetDimmed(bool)

    Fades the whole panel (e.g. when the entity is defeated).

    Declaration
    public void SetDimmed(bool dimmed)
    Parameters
    Type Name Description
    bool dimmed

    SetHighlighted(bool)

    Highlights the panel background (used while it is the selected target).

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

    SetHp(float)

    Declaration
    public void SetHp(float value01)
    Parameters
    Type Name Description
    float value01

    SetLimit(float)

    Declaration
    public void SetLimit(float value01)
    Parameters
    Type Name Description
    float value01

    SetLimitReady(bool)

    Tints the name to signal the limit/finisher is ready (or back to normal).

    Declaration
    public void SetLimitReady(bool ready)
    Parameters
    Type Name Description
    bool ready

    SetName(string)

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