logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SignalFlowSceneTextProbe

    Pure text-only harvest of every signalTypeName value out of one .unity scene file's raw text, used by SignalFlowScanner's scene reaction scan. Public (not internal) because the EditMode test assembly for this scanner is a separate assembly from Serenity.EventDispatcher.Infrastructure.Editor, and the regex here is the single highest-risk piece of the whole scene-reaction scan — a silently wrong pattern ships a scan that finds nothing, with no compiler or runtime signal that anything is missing.

    Inheritance
    object
    SignalFlowSceneTextProbe
    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 SignalFlowSceneTextProbe
    Remarks

    SignalReactionComponent.SignalReaction entries serialize as YAML sequence items — reactions: followed by - signalTypeName: ... per reaction — so the leading (?:-\s+)? in Serenity.EventDispatcher.Infrastructure.Editor.SignalFlowSceneTextProbe.SignalTypeNamePattern is load-bearing: without tolerating that sequence dash, the pattern silently finds nothing against real scene text.

    The anchored ^\s*(?:-\s+)?signalTypeName: key deliberately requires signalTypeName to be the first token on the line (after only whitespace or a sequence dash). The project's only two near-miss fields — UnityShowModalComponent's _signalTypeName and UnityHudElementDefinition's refreshSignalTypeName — both have a non-whitespace prefix immediately before signalTypeName, so this anchor excludes them without an explicit deny-list.

    A prefab instance's override of a reaction's signalTypeName is stored in the scene's m_Modifications block as a propertyPath: reactions.Array.data[0].signalTypeName / value: ... pair, never as a literal signalTypeName: key — this harvest deliberately does not see that shape (a documented scanner limitation, pinned by PropertyPathOverrideLine_IsNotMatched in the harvest tests).

    Confirmed against real project YAML (RestartGameModal.asset, EndGameSessionModal.asset, both of which store a signalTypeName AssemblyQualifiedName): Unity's plain-scalar YAML emitter never quotes this value, even though an AssemblyQualifiedName contains commas — commas are legal inside an unquoted YAML plain scalar. Instead, long values are word-wrapped onto a continuation line, always breaking at the first ", " after the type's full name (a C# full name never contains a space, so the wrap can never land inside it). Serenity.EventDispatcher.Infrastructure.Editor.SignalFlowSceneTextProbe.SignalTypeNamePattern only reads the key's own line, so a wrapped value yields just "Namespace.Type," — incomplete, but still enough for SignalFlowScanner's split-at-first-comma resolver fallback to recover the correct signal type. A defensive single-quote strip is still applied (see Serenity.EventDispatcher.Infrastructure.Editor.SignalFlowSceneTextProbe.StripSurroundingQuotes(System.String)) in case a future value needs YAML quoting for an unrelated reason — not because quoting has ever been observed for this field in this project.

    Methods

    HarvestSignalTypeNames(string)

    Returns every signalTypeName value found in sceneText, one per matched line, in file order. Never throws; a null or empty sceneText yields an empty list.

    Declaration
    public static IReadOnlyList<string> HarvestSignalTypeNames(string sceneText)
    Parameters
    Type Name Description
    string sceneText
    Returns
    Type Description
    IReadOnlyList<string>
    In this article
    © 2026 Serenity. All Rights Reserved