logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class EventDispatcherSignalTypePicker

    Shared searchable selector for concrete EventDispatcherSignal subtypes.
    Renders a dropdown button that opens an UnityEditor.IMGUI.Controls.AdvancedDropdown with a built-in search box; the caller receives the new stored value through a callback so existing serialized data models (string ids based on FullName or AssemblyQualifiedName) are preserved unchanged.

    Inheritance
    object
    EventDispatcherSignalTypePicker
    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 EventDispatcherSignalTypePicker

    Fields

    DEFAULT_TITLE

    Default window title for the searchable signal-type dropdown.

    Declaration
    public const string DEFAULT_TITLE = "Signal Type"
    Field Value
    Type Description
    string

    Methods

    GetConcreteSignalTypes()

    Returns all concrete, non-abstract, parameterless-constructible subtypes of EventDispatcherSignal, ordered by full name. Backed by Unity's UnityEditor.TypeCache so the result refreshes automatically after assembly reloads. Excludes types declared in the project's own test assemblies (Serenity.Global.Infrastructure.Editor.EditorTypePickerFilters) — a designer picking a signal type here should never see a throwaway test fixture.

    Declaration
    public static Type[] GetConcreteSignalTypes()
    Returns
    Type Description
    Type[]

    GetConcreteSignalTypesIncludingTestAssemblies()

    The same parameterless-constructible query as GetConcreteSignalTypes(), without the test-assembly exclusion. Use this for a pure resolvability check (does this AssemblyQualifiedName name a real concrete signal type?) rather than for populating a human-facing dropdown — GameModeSettingsCreator's validation is the one caller that needs this: it must accept whatever concrete type the caller configured, including one declared in a test assembly during that creator's own tests, while the Inspector/wizard dropdowns that also read from this picker keep using the filtered GetConcreteSignalTypes() so a designer never sees a test fixture as a choice.

    Declaration
    public static IEnumerable<Type> GetConcreteSignalTypesIncludingTestAssemblies()
    Returns
    Type Description
    IEnumerable<Type>

    GetDisplayLabel(Type, SignalTypeValueMode)

    Returns the display label for a given type according to mode.

    Declaration
    public static string GetDisplayLabel(Type type, SignalTypeValueMode mode)
    Parameters
    Type Name Description
    Type type
    SignalTypeValueMode mode
    Returns
    Type Description
    string

    GetStoredValue(Type, SignalTypeValueMode)

    Returns the stored string for a given type according to mode.

    Declaration
    public static string GetStoredValue(Type type, SignalTypeValueMode mode)
    Parameters
    Type Name Description
    Type type
    SignalTypeValueMode mode
    Returns
    Type Description
    string

    RenderSearchableSignalTypeField(string, string, SignalTypeValueMode, bool, Object, string, Action<string>)

    Renders a searchable selector for an EventDispatcherSignal subtype.
    The current value is resolved against GetConcreteSignalTypes(); selection writes the new value through onValueChanged, while undo and dirty marking are performed against undoTarget when supplied.

    Declaration
    public static void RenderSearchableSignalTypeField(string label, string currentValue, SignalTypeValueMode valueMode, bool allowNone, Object undoTarget, string undoName, Action<string> onValueChanged)
    Parameters
    Type Name Description
    string label

    Label rendered to the left of the dropdown button.

    string currentValue

    Current stored string (id) backing the selection.

    SignalTypeValueMode valueMode

    How the stored string maps to a Type.

    bool allowNone

    Whether a <None> entry (storing empty string) is offered.

    Object undoTarget

    Object recorded for undo and marked dirty on change; may be null.

    string undoName

    Undo group name; falls back to "Change {label}" when null.

    Action<string> onValueChanged

    Callback receiving the new stored string when the user selects an item.

    RenderSearchableSignalTypeProperty(SerializedProperty, string, SignalTypeValueMode, bool)

    Renders a searchable signal-type selector bound to a serialized string property.

    Declaration
    public static void RenderSearchableSignalTypeProperty(SerializedProperty property, string label, SignalTypeValueMode valueMode, bool allowNone)
    Parameters
    Type Name Description
    SerializedProperty property

    The serialized string property holding the stored signal type.

    string label

    Label rendered to the left of the dropdown button.

    SignalTypeValueMode valueMode

    How the stored string maps to a Type.

    bool allowNone

    Whether a <None> entry (storing empty string) is offered.

    Remarks

    Use this rather than RenderSearchableSignalTypeField(string, string, SignalTypeValueMode, bool, Object, string, Action<string>) whenever the value lives in a UnityEditor.SerializedProperty. The dropdown resolves asynchronously, so the selection arrives after the GUI pass has applied its changes, and writing through the captured property at that point silently does nothing. The write is deferred through Serenity.Global.Infrastructure.Settings.Editor.SerenityTypeSearchPicker.WriteStringDeferred(UnityEditor.SerializedObject,System.String,System.String) instead.

    ShowSignalTypeDropdown(Rect, string, bool, Action<Type>)

    Opens the searchable signal-type dropdown for the "pick a Type" use case (as opposed to RenderSearchableSignalTypeField(string, string, SignalTypeValueMode, bool, Object, string, Action<string>)'s "edit a string field" use case).
    The catalog comes from GetConcreteSignalTypes() and items display Type.Name (AssemblyQualifiedName). The selected index is mapped back to a Type (null for the <None> entry, offered only when allowNone is true) and delivered through onTypeSelected; the caller retains ownership of instantiation, serialization, undo, and dirty marking.

    Declaration
    public static void ShowSignalTypeDropdown(Rect buttonRect, string title, bool allowNone, Action<Type> onTypeSelected)
    Parameters
    Type Name Description
    Rect buttonRect

    Screen rect the dropdown is anchored to (typically the clicked button's rect).

    string title

    Title shown at the root of the dropdown.

    bool allowNone

    Whether a <None> entry is offered, mapping to a null type.

    Action<Type> onTypeSelected

    Callback receiving the selected Type, or null for <None>.

    In this article
    © 2026 Serenity. All Rights Reserved