logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class 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.

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

    Methods

    TryLoad(string, SerenityRecipeReport, out SerenityRecipe)

    Attempts to read and parse a recipe file.

    Declaration
    public static bool TryLoad(string filePath, SerenityRecipeReport report, out SerenityRecipe recipe)
    Parameters
    Type Name Description
    string filePath

    Absolute or project path to the recipe JSON file.

    SerenityRecipeReport report

    The report to write blockers into.

    SerenityRecipe recipe

    The parsed recipe, when successful.

    Returns
    Type Description
    bool

    True when the recipe parsed; false (with a blocker recorded) otherwise.

    TryParse(string, SerenityRecipeReport, out SerenityRecipe)

    Parses recipe JSON text. Exposed for tests that supply JSON directly.

    Declaration
    public static bool TryParse(string json, SerenityRecipeReport report, out SerenityRecipe recipe)
    Parameters
    Type Name Description
    string json

    The recipe JSON text.

    SerenityRecipeReport report

    The report to write blockers into.

    SerenityRecipe recipe

    The parsed recipe, when successful.

    Returns
    Type Description
    bool

    True when the recipe parsed; false otherwise.

    In this article
    © 2026 Serenity. All Rights Reserved