Events

All events fired by the Spark UI system. Subscribe via SparkEventBus.Subscribe<T>().


UIPanelShownEvent

Fired when a UI panel is shown/opened.

Property
Type
Description

Panel

UIPanel

The panel that was shown

PanelName

string

The name of the panel

SparkEventBus.Subscribe<UIPanelShownEvent>(e =>
{
    Debug.Log($"Panel shown: {e.PanelName}");
});

UIPanelHiddenEvent

Fired when a UI panel is hidden/closed.

Property
Type
Description

Panel

UIPanel

The panel that was hidden

PanelName

string

The name of the panel


FirstUIPanelOpenedEvent

Fired when the first UI panel is opened from a state where no panels were open. Useful for pausing gameplay or showing cursor.

Property
Type
Description

Panel

UIPanel

The first panel that was opened


AllUIPanelsClosedEvent

Fired when the last open UI panel is closed, returning to a state with no panels open. Useful for resuming gameplay or hiding cursor.


EscapeKeyPressedEvent

Fired when the escape key is pressed, allowing systems to respond to the escape action.


ShowEventMessageEvent

Fired to request displaying an event message on screen (e.g., "Quest Completed", "Level Up").

Property
Type
Description

Message

string

The message text to display

Duration

float

How long to show the message


CloseAllUIPanelsEvent

Fired to request all UI panels to close. Systems can publish this to force-close all panels.


UISkeletonSpawnedEvent

Fired when the UI skeleton (root UI structure) has been spawned and is ready.

Property
Type
Description

Skeleton

GameObject

The spawned UI skeleton root object

Last updated

Was this helpful?