logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.ProjectRecipe.Infrastructure.Editor

    Classes

    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.

    RecipeSignalCodec

    Bridges recipe RecipeSignalDtos and the [SerializeReference] signal slots on menus, modals, and options, reusing RecipeSerializedPropertyCodec so a signal (parameterless marker or one carrying serialized data) is wired and captured exactly like a generic asset's managed reference. This is the implementation of "typed menu/modal signal wiring" (recipe automation Gap 4).

    RecipeSignalValidation

    Validation helpers for signal DTOs, used by the menu/modal importers' report passes.

    SerenityDiscoveryRegistry

    Emits a machine-readable "what exists" registry so an AI agent can look up the facts it needs to author a valid recipe instead of guessing them: every concrete event signal, every authored action id (the targets of a menu/modal ACTION option), the recipe enum vocabularies, the authorable ScriptableObject types and their recipe section, and the semantic ID contracts. The output is the discovery counterpart to SerenityRecipeReport.ToJson; resolution is decoupled (types are looked up by name) so this editor assembly takes no extra references.

    SerenityProjectRecipeExporterWindow

    Editor window for the Serenity Project Recipe exporter. Scans a project folder for supported Serenity ScriptableObjects and writes a .serenity-recipe.json describing them, which can then be edited and re-imported with the importer window.

    SerenityProjectRecipeImporterWindow

    Editor window for the Serenity Project Recipe importer. Lets a user pick a .serenity-recipe.json file, optionally override the output root, and run validation, a dry run, or a real import — each rendering the resulting report and mirroring it to the console.

    SerenityRecipeAssetDatabase

    Thin wrapper over Unity's UnityEditor.AssetDatabase that centralises folder creation, existence/type probing, asset creation, dirtying, and saving for the importer. Write operations are suppressed when DryRun is true, so callers can share one code path for validation, dry runs, and imports.

    SerenityRecipeEngine

    Orchestrates a recipe run: resolves the output root, builds the shared context, runs cross-section and per-section validation, and (unless blocked or validate-only) drives each section importer. The importer registry is built here, so adding a new section means adding one importer to CreateImporters().

    SerenityRecipeExporter

    Builds a SerenityRecipe from the Serenity ScriptableObjects already in the project and writes it as .serenity-recipe.json. The reverse of SerenityRecipeEngine: scan → map → serialize. The scanned folder becomes the recipe's outputRoot, so an exported recipe re-imports the same assets in place.

    SerenityRecipeImportContext

    Everything a section importer needs for a single run: the parsed recipe, the shared report, the asset database wrapper, the reference resolver, the resolved output root, the import options, and whether this is a dry run. Both validation and import read from the same context, so the requested "validation context" and "import context" are unified here.

    SerenityRecipeLoader

    Reads a .serenity-recipe.json file from disk and parses it into a SerenityRecipe using Unity's UnityEngine.JsonUtility. All failure modes are reported as blockers rather than thrown.

    SerenityRecipePathUtility

    Single source of truth for recipe path logic: normalising separators, combining a relative output path with the configured output root, and validating that the result stays under that root. No other type in the importer should build asset paths by hand.

    SerenityRecipeReferenceResolver

    Resolves references during an import. It maps stable recipe ids to the assets they generate (so later sections can wire cross-recipe references by id), and loads existing project assets by path. This is the backbone that lets future section importers reference earlier output without ever touching Unity GUIDs.

    SerenityRecipeTemplateGenerator

    Produces ready-to-edit Project Recipe stubs for any authorable Serenity ScriptableObject. For the four typed sections it emits an example typed entry; for every other type it instantiates the SO and captures its exact serialized field tree with RecipeSerializedPropertyCodec — so the generated assets shape always matches the current code and never drifts. This is the source of truth the per-ScriptableObject cookbooks point at.

    SerenityRecipeTemplateGeneratorWindow

    Editor window for the Recipe Template Generator. Pick any authorable Serenity ScriptableObject and get a ready-to-edit recipe stub with its exact fields — copy it into a .serenity-recipe.json or save it. The exact assets field tree is captured from the live type, so it never drifts from the code.

    Structs

    ResolvedRecipeAsset

    A generated asset's resolved location and (when written) its instance.

    Enums

    RecipeAssetPresence

    Whether a target asset already exists and, if so, whether its type matches the expected one.

    RecipeRunMode

    How far a recipe run goes.

    In this article
    © 2026 Serenity. All Rights Reserved