logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameUiInstaller

    Unity-specific installer for the GameUi service.

    Inheritance
    object
    UnityGameUiInstaller
    Implements
    IFoundationInstaller
    IInstaller
    Namespace: Serenity.GameUi.Installation.Installers
    Assembly: Serenity.UnityGameUi.Installation.dll
    Syntax
    public class UnityGameUiInstaller : GameUiInstaller, IFoundationInstaller, IInstaller
    Remarks

    Creates the UnityGameUiService, UnityGameHudPresenter, UnityGameResultsPresenter, and UnityGameScreenPresenter on a dedicated GameObject and wires the presenters into the service. Does not create the HUD host: the host ships inside the shared UI prefab (Assets/Serenity/Media/Global/Prefabs/UI.prefab, sibling of the toast host), instantiated later in the initialization pipeline by UnityUiInstaller. Creating one here would race that prefab — this installer runs earlier in the pipeline than the UI install — and leave two hosts in the scene. UnityGameHudPresenter's own creation path stays the self-healing fallback for a custom UI prefab that ships no host.

    Constructors

    UnityGameUiInstaller(IEventDispatcherService)

    Initializes the Unity GameUi installer.

    Declaration
    public UnityGameUiInstaller(IEventDispatcherService eventDispatcherService = null)
    Parameters
    Type Name Description
    IEventDispatcherService eventDispatcherService

    Dispatcher the installed service subscribes to for the ShowHudSignal/HideHudSignal no-code bridge, mirroring UnityFeedbackInstaller's PlayFeedbackSignal wiring. Optional: null skips the subscription.

    Methods

    GetHudDefinitionProvider()

    Gets the HUD definition provider created during install, for registration in the service locator so UnityHudHostComponent can resolve a HUD by id with nothing scene-authored. Null before install. Mirrors UnityFeedbackInstaller.GetActingDeviceTracker.

    Declaration
    public IHudDefinitionProvider GetHudDefinitionProvider()
    Returns
    Type Description
    IHudDefinitionProvider

    Install(ILogService)

    Installs the GameUi service by creating the Unity MonoBehaviour implementation with HUD, results, and screen presenters, and the Addressables-backed HUD definition provider. The HUD host itself is not created here — see the class remarks.

    Declaration
    public override void Install(ILogService logService)
    Parameters
    Type Name Description
    ILogService logService

    The logging service for diagnostic output.

    Implements

    IFoundationInstaller
    IInstaller
    In this article
    © 2026 Serenity. All Rights Reserved