logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudNumberRepresentation

    Shows the bound value as a number, with a chosen precision, zero padding and grouping.

    Inheritance
    object
    UnityHudRepresentation
    UnityHudTextualRepresentation
    UnityHudNumberRepresentation
    Implements
    IHudTextRepresentation
    IHudRepresentation
    Inherited Members
    UnityHudTextualRepresentation.CreateRenderer()
    UnityHudRepresentation.FollowsTheme
    UnityHudRepresentation.HasThemedChrome
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.GameUi.Infrastructure.Representations
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public sealed class UnityHudNumberRepresentation : UnityHudTextualRepresentation, IHudTextRepresentation, IHudRepresentation

    Constructors

    UnityHudNumberRepresentation()

    Declaration
    public UnityHudNumberRepresentation()

    Properties

    Kind

    Declaration
    public override HudRepresentationKind Kind { get; }
    Property Value
    Type Description
    HudRepresentationKind
    Overrides
    UnityHudRepresentation.Kind

    Methods

    Configure(int, int, bool)

    Configures the number format. Used by the builder tool.

    Declaration
    public void Configure(int places, int minimumDigits, bool grouped)
    Parameters
    Type Name Description
    int places

    Decimal places to show.

    int minimumDigits

    Minimum zero-padded integer digits.

    bool grouped

    Whether to group thousands.

    FormatValue(CompiledHudBinding)

    Renders the binding's current value as display text, or the binding's fallback when it cannot be read.

    Declaration
    public override string FormatValue(CompiledHudBinding binding)
    Parameters
    Type Name Description
    CompiledHudBinding binding

    The element's value binding.

    Returns
    Type Description
    string

    The text to show.

    Overrides
    UnityHudTextualRepresentation.FormatValue(CompiledHudBinding)

    Implements

    IHudTextRepresentation
    IHudRepresentation
    In this article
    © 2026 Serenity. All Rights Reserved