Class UnityHudTextRepresentation
Shows the bound value's own text, exactly as the binding produced it.
Inherited Members
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
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. |