logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudBindingReferenceResolver

    Hands the engine-agnostic HUD scanner the directly-referenced source object behind a binding.

    Inheritance
    object
    HudBindingReferenceResolver
    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.Editor.Builder
    Assembly: Serenity.UnityGameUi.Infrastructure.Editor.dll
    Syntax
    public static class HudBindingReferenceResolver
    Remarks

    The scanner is pure and cannot know what a UnityEngine.Object is, so someone has to bridge the two — and there are three callers that need to: the project validator, the builder's pre-write check, and the drawer's per-element hints.

    The bridging is not a cast. A destroyed UnityEngine.Object is not really null, and the overloaded == that hides this stops applying the moment the value is typed as object. Without the check below, a binding pointing at a deleted asset would be handed across as present and judged authored when it is broken — the exact silent rot the HUD validator exists to catch.

    Methods

    Resolve(IHudBinding)

    Resolves a binding's direct object reference, or null when there is not a live one.

    Declaration
    public static object Resolve(IHudBinding binding)
    Parameters
    Type Name Description
    IHudBinding binding

    The binding to read.

    Returns
    Type Description
    object

    The referenced object, or null.

    In this article
    © 2026 Serenity. All Rights Reserved