logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameUiService

    Unity MonoBehaviour implementation of IGameUiService.

    Inheritance
    object
    UnityGameUiService
    Implements
    IGameUiService
    IService
    IFoundationSettings
    Namespace: Serenity.GameUi.Infrastructure.Services
    Assembly: Serenity.UnityGameUi.Infrastructure.dll
    Syntax
    public class UnityGameUiService : MonoBehaviour, IGameUiService, IService, IFoundationSettings
    Remarks

    Delegates state tracking to UiState and forwards rendering commands to injected IGameHudPresenter and IGameResultsPresenter instances.

    Constructors

    UnityGameUiService()

    Declaration
    public UnityGameUiService()

    Properties

    ActiveScreen

    Declaration
    public UiScreenId ActiveScreen { get; }
    Property Value
    Type Description
    UiScreenId

    CurrentHudState

    Declaration
    public HudState CurrentHudState { get; }
    Property Value
    Type Description
    HudState

    CurrentResultsState

    Declaration
    public ResultsState CurrentResultsState { get; }
    Property Value
    Type Description
    ResultsState

    Guid

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

    Id

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

    LogService

    Declaration
    public ILogService LogService { get; set; }
    Property Value
    Type Description
    ILogService

    Methods

    HideHud()

    Declaration
    public void HideHud()

    HideResults()

    Declaration
    public void HideResults()

    InitializeService(ILogService, IGameHudPresenter, IGameResultsPresenter)

    Initializes the service with required dependencies.

    Declaration
    public void InitializeService(ILogService logService, IGameHudPresenter hudPresenter, IGameResultsPresenter resultsPresenter)
    Parameters
    Type Name Description
    ILogService logService

    The logging service for diagnostic output.

    IGameHudPresenter hudPresenter

    The HUD presenter implementation.

    IGameResultsPresenter resultsPresenter

    The results screen presenter implementation.

    SetActiveScreen(UiScreenId)

    Declaration
    public void SetActiveScreen(UiScreenId screenId)
    Parameters
    Type Name Description
    UiScreenId screenId

    SetHudState(HudState)

    Declaration
    public void SetHudState(HudState hudState)
    Parameters
    Type Name Description
    HudState hudState

    ShowHud()

    Declaration
    public void ShowHud()

    ShowResults(bool, float)

    Declaration
    public void ShowResults(bool isVictory, float finalTime)
    Parameters
    Type Name Description
    bool isVictory
    float finalTime

    Implements

    IGameUiService
    IService
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved