logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudCreator

    Creates and updates HUD assets. All asset mutation for the HUD builder lives here; the window only collects input and renders results.

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

    Mirrors ModalCreator and LeaderboardCreator: static class, Input/Result DTOs, Validate then Create. Creation runs inside a Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction, so a failure part-way through removes the Addressables entries, deletes the created assets AND deletes the folder the run created, instead of leaving debris.

    Fields

    DefaultOutputFolder

    Default folder for generated HUD assets.

    Declaration
    public const string DefaultOutputFolder = "Assets/Media/GeneratedHuds"
    Field Value
    Type Description
    string

    InstallTaskMethodName

    The UnitySerenityInstaller method the boot task must invoke for a HUD to appear at runtime: it is what registers IGameUiService and IHudDefinitionProvider. A HUD asset in a project whose initialization pipeline never runs this method imports fine and renders nothing.

    Declaration
    public const string InstallTaskMethodName = "InstallGameUi"
    Field Value
    Type Description
    string

    OutputSection

    Section name for findings about the write target rather than the HUD itself.

    Declaration
    public const string OutputSection = "Output"
    Field Value
    Type Description
    string

    Methods

    Create(Input)

    Creates the HUD asset, or updates the one the input names.

    Declaration
    public static HudCreator.Result Create(HudCreator.Input input)
    Parameters
    Type Name Description
    HudCreator.Input input

    What to write.

    Returns
    Type Description
    HudCreator.Result

    The outcome, including the written asset.

    Validate(Input)

    Checks the input without touching the project.

    Declaration
    public static SerenityCreationValidationResult Validate(HudCreator.Input input)
    Parameters
    Type Name Description
    HudCreator.Input input

    What the caller wants created.

    Returns
    Type Description
    SerenityCreationValidationResult

    The errors and warnings found.

    In this article
    © 2026 Serenity. All Rights Reserved