Class UnityToastSignalReactionComponent
Bridge that turns a dispatched ShowToastSignal into a visible toast on a
UnityToastComponent.
Unlike SignalReactionComponent (whose response is parameterless), this listener reads the
signal's Message payload and forwards it to Show(string),
so one component renders any message — letting different call sites (e.g. each cascade menu option)
request a different toast without one event per message.
Namespace: Serenity.Ui.Infrastructure.Components.Toast
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityToastSignalReactionComponent : MonoBehaviour
Remarks
Subscription goes through the shared IEventDispatcherService resolved via ServiceLocatorBridge. Because the service is registered during the initialization pipeline (possibly after this component is enabled), binding waits via a coroutine.
A host that starts inactive never runs OnEnable, so the UI install binds it from outside through
BindTo(IEventDispatcherService) (see UnityToastHostBinder). The subscription then lasts for the host's
lifetime rather than its enabled time, and a toast arriving while the host is inactive activates the host
to show it.
Only a host that has never been on screen is activated that way: once a host has been active, deactivating it is the author's choice (a cutscene or a loading screen hiding toasts), so toasts arriving while it stays hidden are dropped with one warning, like a toast whose parent keeps it hidden.
Constructors
UnityToastSignalReactionComponent()
Declaration
public UnityToastSignalReactionComponent()
Methods
BindTo(IEventDispatcherService)
Subscribes this host to the toast signal through dispatcher, whether or not the host
is active; a host already bound keeps its binding.
Declaration
public void BindTo(IEventDispatcherService dispatcher)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventDispatcherService | dispatcher |