logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

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

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

    Constructors

    SerenityRecipeReferenceResolver()

    Declaration
    public SerenityRecipeReferenceResolver()

    Methods

    ExistingAssetExists(string)

    Returns true when any asset exists at the given project path.

    Declaration
    public bool ExistingAssetExists(string assetPath)
    Parameters
    Type Name Description
    string assetPath

    The project path.

    Returns
    Type Description
    bool

    True when an asset is present.

    IsGenerated(string)

    Returns true when a recipe id has been registered as generated.

    Declaration
    public bool IsGenerated(string id)
    Parameters
    Type Name Description
    string id

    The recipe id.

    Returns
    Type Description
    bool

    True when the id is known.

    LoadExistingAsset<T>(string)

    Loads an existing project asset of type T by path.

    Declaration
    public T LoadExistingAsset<T>(string assetPath) where T : Object
    Parameters
    Type Name Description
    string assetPath

    The project path.

    Returns
    Type Description
    T

    The loaded asset, or null when absent/incompatible.

    Type Parameters
    Name Description
    T

    The asset type.

    RegisterGenerated(string, string, Object)

    Records that a recipe id produced an asset at a path (and, outside dry runs, an instance).

    Declaration
    public void RegisterGenerated(string id, string assetPath, Object asset)
    Parameters
    Type Name Description
    string id

    The recipe id.

    string assetPath

    The asset's project path.

    Object asset

    The asset instance, or null in a dry run.

    TryResolveRecipeId(string, out ResolvedRecipeAsset)

    Attempts to resolve a recipe id to its generated asset.

    Declaration
    public bool TryResolveRecipeId(string id, out ResolvedRecipeAsset resolved)
    Parameters
    Type Name Description
    string id

    The recipe id.

    ResolvedRecipeAsset resolved

    The resolved reference, when found.

    Returns
    Type Description
    bool

    True when the id resolved.

    In this article
    © 2026 Serenity. All Rights Reserved