logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StructuredBackendAuthoringFactory

    Engine-side (non-IMGUI) half of the shared backend authoring step: per-kind connection defaults, validation, and shared backend asset construction. Extracted from Serenity.Leaderboard.Infrastructure.Editor.Builder.LeaderboardCreator so the GameSave and GameProgress creation wizards do not each duplicate this logic a second and third time; Leaderboard's own copy is left untouched to avoid touching its already-tested code.

    Inheritance
    object
    StructuredBackendAuthoringFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.StructuredPersistence.Infrastructure.Editor.Authoring
    Assembly: Serenity.UnityStructuredPersistence.Infrastructure.Editor.dll
    Syntax
    public static class StructuredBackendAuthoringFactory

    Fields

    DatabaseKinds

    Declaration
    public static readonly StructuredBackendAuthoringKind[] DatabaseKinds
    Field Value
    Type Description
    StructuredBackendAuthoringKind[]

    Methods

    BuildBackendAsset(StructuredBackendAuthoringKind, StructuredBackendAuthoringFields, string, string)

    Instantiates the shared, consumer-agnostic backend asset for the chosen authoring kind and fills only the fields that subtype actually carries. Every kind produces an explicit asset — including PlayerPrefs, whose definition is field-less — because the runtime selects the store by the asset's concrete type.

    Declaration
    public static UnityStructuredBackendDefinition BuildBackendAsset(StructuredBackendAuthoringKind kind, StructuredBackendAuthoringFields fields, string defaultLocalFileDirectoryName, string defaultSqliteDatabaseFileName)
    Parameters
    Type Name Description
    StructuredBackendAuthoringKind kind
    StructuredBackendAuthoringFields fields
    string defaultLocalFileDirectoryName
    string defaultSqliteDatabaseFileName
    Returns
    Type Description
    UnityStructuredBackendDefinition

    GetKindDefaults(StructuredBackendAuthoringKind, string)

    Connection defaults for a given backend kind. Non-server kinds report Port 0 and the shared Database name since none of them use a server connection. Sqlite reports TimeoutSeconds 0 because the shared UnitySqliteBackendDefinition carries no timeout knob — the driver default applies.

    Declaration
    public static StructuredBackendAuthoringFactory.KindDefaults GetKindDefaults(StructuredBackendAuthoringKind kind, string defaultSqliteDatabaseFileName)
    Parameters
    Type Name Description
    StructuredBackendAuthoringKind kind
    string defaultSqliteDatabaseFileName
    Returns
    Type Description
    StructuredBackendAuthoringFactory.KindDefaults

    IsDatabaseKind(StructuredBackendAuthoringKind)

    Declaration
    public static bool IsDatabaseKind(StructuredBackendAuthoringKind kind)
    Parameters
    Type Name Description
    StructuredBackendAuthoringKind kind
    Returns
    Type Description
    bool

    ScriptingDefineFor(StructuredBackendAuthoringKind)

    The scripting define a database kind's driver requires, or empty for a non-database kind.

    Declaration
    public static string ScriptingDefineFor(StructuredBackendAuthoringKind kind)
    Parameters
    Type Name Description
    StructuredBackendAuthoringKind kind
    Returns
    Type Description
    string

    ValidateBackendFields(StructuredBackendAuthoringKind, StructuredBackendAuthoringFields, SerenityCreationValidationResult)

    Validates fields for kind, reporting into result.

    Declaration
    public static void ValidateBackendFields(StructuredBackendAuthoringKind kind, StructuredBackendAuthoringFields fields, SerenityCreationValidationResult result)
    Parameters
    Type Name Description
    StructuredBackendAuthoringKind kind
    StructuredBackendAuthoringFields fields
    SerenityCreationValidationResult result
    In this article
    © 2026 Serenity. All Rights Reserved