logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RecipeObjectReferenceCodec

    Encodes an object reference as the text a recipe carries, and resolves that text back to the object: a main asset is its bare asset path, a sub-asset (a mixer group, a sprite in a sheet) is its asset path and local file id joined by SubAssetSeparator. The object-reference half of RecipeSerializedPropertyCodec.

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

    Fields

    SubAssetSeparator

    Separates an asset path from the local file id of the sub-asset it names (Assets/Audio/Main.mixer#6842158004252729940); a main asset is encoded as its bare path.

    Declaration
    public const char SubAssetSeparator = '#'
    Field Value
    Type Description
    char

    Methods

    Encode(Object)

    The recipe text for reference: empty for none, the asset path for a main asset, the path and local file id for a sub-asset.

    Declaration
    public static string Encode(Object reference)
    Parameters
    Type Name Description
    Object reference
    Returns
    Type Description
    string

    Resolve(string, List<string>)

    The object encoded names, or null — with a warning when the text named an asset that is not there.

    Declaration
    public static Object Resolve(string encoded, List<string> warnings)
    Parameters
    Type Name Description
    string encoded
    List<string> warnings
    Returns
    Type Description
    Object
    In this article
    © 2026 Serenity. All Rights Reserved