logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeSerializedPropertyCodec

    Converts a ScriptableObject's UnityEditor.SerializedProperty tree to and from RecipeNodes. Handles primitives, enums, vectors/colors/rects, object references (encoded as asset paths), arrays/lists, nested structs, and polymorphic [SerializeReference] managed references (e.g. signals). This is the engine behind the generic assets section and the signal-wiring capture on menus/modals.

    Inheritance
    object
    RecipeSerializedPropertyCodec
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.ProjectRecipe.Infrastructure.Editor
    Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
    Syntax
    public static class RecipeSerializedPropertyCodec

    Fields

    DefaultMaxDepth

    Recursion cap that keeps generated JSON within JsonUtility's serialization depth limit.

    Declaration
    public const int DefaultMaxDepth = 10
    Field Value
    Type Description
    int

    Methods

    ApplyFields(SerializedObject, RecipeNode[], List<string>)

    Applies captured field nodes onto a SerializedObject (call ApplyModifiedProperties afterwards).

    Declaration
    public static void ApplyFields(SerializedObject serializedObject, RecipeNode[] nodes, List<string> warnings)
    Parameters
    Type Name Description
    SerializedObject serializedObject

    The object to write.

    RecipeNode[] nodes

    The field nodes.

    List<string> warnings

    Collects messages about unresolved fields/types.

    ApplyProperty(SerializedProperty, RecipeNode, List<string>)

    Applies a single captured node onto a (possibly nested) serialized property — e.g. a menu's signal field or an option's submit-signal list. Honours the same array merge modes as the top-level path. Call ApplyModifiedProperties* on the owning object afterwards.

    Declaration
    public static void ApplyProperty(SerializedProperty property, RecipeNode node, List<string> warnings)
    Parameters
    Type Name Description
    SerializedProperty property

    The property to write.

    RecipeNode node

    The node to apply.

    List<string> warnings

    Collects messages about unresolved fields/types.

    CaptureFields(SerializedObject, List<string>)

    Captures the top-level serialized fields of a SerializedObject (excludes m_Script, Id, Guid).

    Declaration
    public static RecipeNode[] CaptureFields(SerializedObject serializedObject, List<string> warnings)
    Parameters
    Type Name Description
    SerializedObject serializedObject

    The object to read.

    List<string> warnings

    Collects messages about skipped/unsupported fields.

    Returns
    Type Description
    RecipeNode[]

    The field nodes.

    CaptureProperty(SerializedProperty, List<string>)

    Captures a single (possibly nested) serialized property into a node — e.g. a menu's signal field or an option's submit-signal list. The top-level CaptureFields(SerializedObject, List<string>) path uses this internally.

    Declaration
    public static RecipeNode CaptureProperty(SerializedProperty property, List<string> warnings)
    Parameters
    Type Name Description
    SerializedProperty property

    The property to read.

    List<string> warnings

    Collects messages about skipped/unsupported fields.

    Returns
    Type Description
    RecipeNode

    The captured node.

    ResolveManagedType(string)

    Resolves a managed reference type from its "<assembly> <fullTypeName>" token.

    Declaration
    public static Type ResolveManagedType(string fullTypename)
    Parameters
    Type Name Description
    string fullTypename

    The value of SerializedProperty.managedReferenceFullTypename.

    Returns
    Type Description
    Type

    The resolved type, or null.

    In this article
    © 2026 Serenity. All Rights Reserved