logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityHudDefinition

    An authored HUD: the set of elements shown together. A project can hold several — one per game mode, say — and switch between them through HudState.ActiveHudId.

    Inheritance
    object
    UnityHudDefinition
    Implements
    IHudDefinition
    IFoundationSettings
    Namespace: Serenity.GameUi.Infrastructure.Settings
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public class UnityHudDefinition : ScriptableObject, IHudDefinition, IFoundationSettings
    Remarks

    Elements are nested serialized data rather than separate assets, following the composite view's child slots: a HUD is edited as one thing, so it is one file in a diff and one asset to keep Addressable.

    Constructors

    UnityHudDefinition()

    Declaration
    public UnityHudDefinition()

    Properties

    ElementSettings

    The elements in their concrete form, for renderers that need the Unity-only fields.

    Declaration
    public IReadOnlyList<UnityHudElementDefinition> ElementSettings { get; }
    Property Value
    Type Description
    IReadOnlyList<UnityHudElementDefinition>

    Elements

    Declaration
    public IReadOnlyList<IHudElementDefinition> Elements { get; }
    Property Value
    Type Description
    IReadOnlyList<IHudElementDefinition>

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    Methods

    SetElements(IEnumerable<UnityHudElementDefinition>)

    Replaces the element list. Used by the builder tool.

    Declaration
    public void SetElements(IEnumerable<UnityHudElementDefinition> value)
    Parameters
    Type Name Description
    IEnumerable<UnityHudElementDefinition> value

    The elements this HUD shows.

    Implements

    IHudDefinition
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved