Class SerenityEditorSignalDispatcher
Editor-only entry point that lets an authoring window dispatch an EventDispatcherSignal through the live IEventDispatcherService while Play Mode is running — e.g. a "Fire Now" preview button on a settings builder.
Deliberately does not latch the resolved service. SignalEmitterComponent caches a
successful lookup because it lives on a gameplay object that re-runs every frame for the lifetime of a
single Play session. This class is the inverse: it is called from an editor window that survives Play
Mode exit and domain reloads, so a service resolved during one Play session would be a dangling
reference on the next one. Resolving fresh on every call trades a cheap repeated lookup for correctness
across sessions.
Inherited Members
Namespace: Serenity.EventDispatcher.Infrastructure.Editor
Assembly: Serenity.UnityEventDispatcher.Infrastructure.Editor.dll
Syntax
public static class SerenityEditorSignalDispatcher
Methods
CanDispatch(out string)
Checks whether TryDispatch(EventDispatcherSignal, out string) can currently succeed, without dispatching anything.
Declaration
public static bool CanDispatch(out string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reason | A human-readable explanation when dispatch is not currently possible; empty when it is. |
Returns
| Type | Description |
|---|---|
| bool |
|
TryDispatch(EventDispatcherSignal, out string)
Dispatches signal through the live IEventDispatcherService,
resolving the service fresh on every call (see class remarks).
Declaration
public static bool TryDispatch(EventDispatcherSignal signal, out string error)
Parameters
| Type | Name | Description |
|---|---|---|
| EventDispatcherSignal | signal | The signal to dispatch. |
| string | error | A human-readable explanation when dispatch fails; empty on success. |
Returns
| Type | Description |
|---|---|
| bool |
|