logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudBinding

    Inspector-authored implementation of IHudBinding.

    Inheritance
    object
    UnityHudBinding
    Implements
    IHudBinding
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameUi.Infrastructure.Settings
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public class UnityHudBinding : IHudBinding

    Constructors

    UnityHudBinding()

    Declaration
    public UnityHudBinding()

    Properties

    FallbackText

    Declaration
    public string FallbackText { get; }
    Property Value
    Type Description
    string

    IsAuthored

    Whether this binding has been authored at all.

    Declaration
    public bool IsAuthored { get; }
    Property Value
    Type Description
    bool
    Remarks

    An element's capacity binding is optional, and Unity serializes an unset one as a default instance rather than null, so emptiness has to be asked rather than null-checked.

    ObjectReference

    The referenced object, for the scene-object and asset source kinds.

    Declaration
    public Object ObjectReference { get; }
    Property Value
    Type Description
    Object

    SourceKind

    Declaration
    public HudBindingSourceKind SourceKind { get; }
    Property Value
    Type Description
    HudBindingSourceKind

    SourceTypeName

    Declaration
    public string SourceTypeName { get; }
    Property Value
    Type Description
    string

    Steps

    Declaration
    public IReadOnlyList<IHudMemberStep> Steps { get; }
    Property Value
    Type Description
    IReadOnlyList<IHudMemberStep>

    ValueTransform

    Declaration
    public HudValueTransform ValueTransform { get; }
    Property Value
    Type Description
    HudValueTransform
    Remarks

    Null-safe: a binding asset serialized before this field existed deserializes it as a default UnityHudValueTransform instance, which converts to kind NONE — the same no-op every legacy binding already got, with no migration step required.

    Methods

    SetFallbackText(string)

    Sets the text shown when the value cannot be read.

    Declaration
    public void SetFallbackText(string text)
    Parameters
    Type Name Description
    string text

    The fallback text.

    SetObjectSource(Object, HudBindingSourceKind)

    Points this binding at a directly referenced object. Used by the builder tool.

    Declaration
    public void SetObjectSource(Object reference, HudBindingSourceKind kind)
    Parameters
    Type Name Description
    Object reference

    The component or asset to read from.

    HudBindingSourceKind kind

    Whether the reference is a scene object or an asset.

    SetServiceSource(string)

    Points this binding at a registered service contract. Used by the builder tool.

    Declaration
    public void SetServiceSource(string assemblyQualifiedTypeName)
    Parameters
    Type Name Description
    string assemblyQualifiedTypeName

    The service contract type.

    SetSteps(IEnumerable<UnityHudMemberStep>)

    Replaces the member chain. Used by the builder tool.

    Declaration
    public void SetSteps(IEnumerable<UnityHudMemberStep> chain)
    Parameters
    Type Name Description
    IEnumerable<UnityHudMemberStep> chain

    The steps, in read order.

    Implements

    IHudBinding
    In this article
    © 2026 Serenity. All Rights Reserved