Class ShowHudElementSignal
Requests that a single HUD element be shown again after being hidden with
HideHudElementSignal. Handled by the view (UnityHudHostComponent) rather than the
business IGameUiService — element visibility is presentation state, not part of HudState.
Namespace: Serenity.GameUi.Application.Events
Assembly: Serenity.GameUi.Application.dll
Syntax
public class ShowHudElementSignal : EventDispatcherSignal
Remarks
ElementId and HudId are mutable fields, not readonly ones, even though every
caller only ever sets them through the constructor: Unity does not serialize readonly fields, and this
signal is also authored as a plain embedded instance — a [SerializeReference] entry in
UnityGameModeSignalConfiguration.Signals/ExitSignals. A readonly field there would
serialize as permanently empty.
Constructors
ShowHudElementSignal()
Initializes an empty signal (used by the inspector / serialization).
Declaration
public ShowHudElementSignal()
ShowHudElementSignal(string, string)
Initializes a signal that shows the element identified by elementId.
Declaration
public ShowHudElementSignal(string elementId, string hudId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | elementId | Id of the element to show. |
| string | hudId | Optional HUD id to scope the signal to; empty applies to whichever HUD is active. |
Fields
ElementId
Declaration
public string ElementId
Field Value
| Type | Description |
|---|---|
| string | Id of the element to show, as authored on the HUD's element list. |
HudId
Declaration
public string HudId
Field Value
| Type | Description |
|---|---|
| string | Optional HUD id this signal is scoped to. When set and it does not match the HUD currently shown, the signal is ignored — empty (the default) applies to whichever HUD is active. |
Methods
ToString()
Returns a string representation of the signal.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |