logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    SerenityEditorSignalDispatcher
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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

    true when a signal can be dispatched right now.

    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

    true when the signal was dispatched.

    In this article
    © 2026 Serenity. All Rights Reserved