logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudTextRepresentation

    Shows the bound value's own text, exactly as the binding produced it.

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

    Deliberately without a prefix or suffix. Text glued to a dynamic value can never be translated — the localization service would have to look "Score: 1234" up as a key — so wording around a value belongs to the element's caption, which is translatable, not here. Removing the fields is what makes the untranslatable sentence unwritable.

    Constructors

    UnityHudTextRepresentation()

    Declaration
    public UnityHudTextRepresentation()

    Properties

    Kind

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

    Methods

    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