Class UnityGameUiInstaller
Unity-specific installer for the GameUi service.
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 |
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. |