Class ShowHudSignal
Requests that the HUD identified by HudId be shown. This is the no-code path onto
IGameUiService.SetHudState — the same call UnityGameHudPresenter-driven code makes,
just reachable from a SignalEmitterComponent with no generated script.
Namespace: Serenity.GameUi.Application.Events
Assembly: Serenity.GameUi.Application.dll
Syntax
public class ShowHudSignal : EventDispatcherSignal
Remarks
HudId is a mutable field, not a readonly one, even though every caller only ever sets it
through the constructor: Unity does not serialize readonly fields, and this signal is also authored as
a plain (non-Addressables) embedded instance — a [SerializeReference] entry in
UnityGameModeSignalConfiguration.Signals/ExitSignals, so a mode's enter/exit signal list
can dispatch ShowHudSignal directly. A readonly field there would serialize as permanently empty,
which is exactly the bug this field shape fixes.
Constructors
ShowHudSignal()
Initializes an empty signal (used by the inspector / serialization).
Declaration
public ShowHudSignal()
ShowHudSignal(string)
Initializes a signal that shows the HUD identified by hudId.
Declaration
public ShowHudSignal(string hudId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hudId | The id of the HUD definition to show. |
Fields
HudId
Declaration
public string HudId
Field Value
| Type | Description |
|---|---|
| string | The id of the HUD definition to show ( |
Methods
ToString()
Returns a string representation of the signal.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |