logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PersistenceBackendCreationMenu

    The Persistence row's Create action: every concrete UnityStructuredBackendDefinition subtype that declares UnityEngine.CreateAssetMenuAttribute is a candidate, offered in a UnityEditor.GenericMenu; the chosen one is instantiated under "<OutputRoot>/Persistence/<DisplayName>.asset" and registered Addressable under PERSISTENCE.

    Inheritance
    object
    PersistenceBackendCreationMenu
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.CreateGame.Infrastructure.Editor.Systems
    Assembly: Serenity.UnityCreateGame.Infrastructure.Editor.dll
    Syntax
    public static class PersistenceBackendCreationMenu

    Methods

    Create(PersistenceBackendOption, string, bool)

    Creates option's backend asset under "<outputRoot>/Persistence/<DisplayName>.asset", with a sanitized default Id, committed as an Addressable under PERSISTENCE unless registerAsAddressables is false (test seam). Returns the created asset's path.

    Declaration
    public static string Create(PersistenceBackendOption option, string outputRoot, bool registerAsAddressables = true)
    Parameters
    Type Name Description
    PersistenceBackendOption option
    string outputRoot
    bool registerAsAddressables
    Returns
    Type Description
    string

    DiscoverOptions()

    Every backend type this menu can create, ordered by display name (ordinal).

    Declaration
    public static IReadOnlyList<PersistenceBackendOption> DiscoverOptions()
    Returns
    Type Description
    IReadOnlyList<PersistenceBackendOption>

    Show(string, Action<string>)

    Shows a context UnityEditor.GenericMenu listing DiscoverOptions(); choosing one creates it under outputRoot and invokes onCreated with the new asset's path.

    Declaration
    public static void Show(string outputRoot, Action<string> onCreated)
    Parameters
    Type Name Description
    string outputRoot
    Action<string> onCreated
    In this article
    © 2026 Serenity. All Rights Reserved