logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudRepresentationInspectorGui

    Picks how a HUD element draws, and edits whatever the chosen representation needs.

    Inheritance
    object
    HudRepresentationInspectorGui
    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 HudRepresentationInspectorGui
    Remarks

    The subtypes are discovered through UnityEditor.TypeCache rather than a hand-written menu, so a new representation appears in the list without anyone remembering to edit this file.

    Fields

    NoRepresentationLabel

    What DescribeAssigned(SerializedProperty) says when nothing is assigned.

    Declaration
    public const string NoRepresentationLabel = "no representation"
    Field Value
    Type Description
    string

    Methods

    DescribeAssigned(SerializedProperty)

    Names the representation a serialized reference currently holds.

    Declaration
    public static string DescribeAssigned(SerializedProperty representation)
    Parameters
    Type Name Description
    SerializedProperty representation

    The serialized representation.

    Returns
    Type Description
    string

    Its kind, or a plain statement that none is assigned.

    Draw(SerializedProperty)

    Draws the representation picker and the chosen representation's own fields.

    Declaration
    public static void Draw(SerializedProperty representation)
    Parameters
    Type Name Description
    SerializedProperty representation

    The serialized [SerializeReference] representation.

    ResolveType(SerializedProperty)

    The concrete representation a serialized reference holds, or null.

    Declaration
    public static Type ResolveType(SerializedProperty representation)
    Parameters
    Type Name Description
    SerializedProperty representation

    The serialized representation.

    Returns
    Type Description
    Type

    The type, or null when none is assigned or it no longer exists.

    In this article
    © 2026 Serenity. All Rights Reserved