logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudTimeRepresentation

    Shows the bound value as a stopwatch: a duration in seconds, written out with the units, padding, separators and precision the element chooses.

    Inheritance
    object
    UnityHudRepresentation
    UnityHudTextualRepresentation
    UnityHudTimeRepresentation
    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 UnityHudTimeRepresentation : UnityHudTextualRepresentation, IHudTextRepresentation, IHudRepresentation
    Remarks

    There is no named "arcade" style here, because there is no such thing as one arcade style. The 01'35"00 of a light-gun cabinet is two minute digits, an apostrophe, two decimals and a double quote — a combination, not a format. Naming it would bake one game's convention into the framework and leave every other one unreachable.

    Constructors

    UnityHudTimeRepresentation()

    Declaration
    public UnityHudTimeRepresentation()

    Properties

    Kind

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

    Methods

    Configure(StopwatchDisplayOptions, int)

    Configures the stopwatch. Used by the builder tool.

    Declaration
    public void Configure(StopwatchDisplayOptions options, int fractionDigits)
    Parameters
    Type Name Description
    StopwatchDisplayOptions options

    Units, padding and separators.

    int fractionDigits

    Fractional second digits.

    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