logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ScoreSettingsCreator

    Generates (or updates) the project-wide UnityScoreSettings asset from a single description. Mirrors Serenity.GameSave.Infrastructure.Editor.Builder.GameSaveCreator: static class, Input/Result DTOs, Validate/ValidateIdentity, Create with created-paths rollback on failure. CreateScoreSettingsWindow only collects input and renders results; every asset mutation lives here. No [MenuItem] anymore — the window owns the menu entry point.

    Inheritance
    object
    ScoreSettingsCreator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Score.Infrastructure.Editor.Builder
    Assembly: Serenity.UnityScore.Infrastructure.Editor.dll
    Syntax
    public static class ScoreSettingsCreator

    Fields

    DefaultSettingsFolderPath

    Default output folder for a brand-new settings asset. Under the GAME's content root, never the package's: assets created inside Assets/Serenity belong to the package and get swept by self-cleaning upgrades — user-authored settings must live in user territory, matching the Assets/Game root the Setup Assistant and recipe tooling already default to.

    Declaration
    public const string DefaultSettingsFolderPath = "Assets/Game/Media/Score"
    Field Value
    Type Description
    string

    Methods

    Create(Input)

    Validates the request, then either updates the existing asset named by ExistingSettingsAssetPath or creates a brand-new one. On any failure during creation every mutation is rolled back so the project is left untouched; an update failure cannot occur past validation, since it only ever writes already-validated fields onto an asset already confirmed to exist.

    Declaration
    public static ScoreSettingsCreator.Result Create(ScoreSettingsCreator.Input input)
    Parameters
    Type Name Description
    ScoreSettingsCreator.Input input
    Returns
    Type Description
    ScoreSettingsCreator.Result

    ResolveSettingsContext(string)

    Thin wrapper over the shared ResolveSettingsContext<TSettings>(string), exposed so the window can auto-detect the project-wide singleton for its "Edit existing" field.

    Declaration
    public static SettingsAssetAuthoring.SettingsResolution<UnityScoreSettings> ResolveSettingsContext(string explicitSettingsAssetPath = "")
    Parameters
    Type Name Description
    string explicitSettingsAssetPath
    Returns
    Type Description
    SettingsResolution<UnityScoreSettings>

    Validate(Input)

    Full validation, re-checked at creation time so Create(Input) is safe to call independently of the window's live validation.

    Declaration
    public static SerenityCreationValidationResult Validate(ScoreSettingsCreator.Input input)
    Parameters
    Type Name Description
    ScoreSettingsCreator.Input input
    Returns
    Type Description
    SerenityCreationValidationResult

    ValidateIdentity(Input)

    Asset-name-only validation, usable before a folder choice has been made.

    Declaration
    public static SerenityCreationValidationResult ValidateIdentity(ScoreSettingsCreator.Input input)
    Parameters
    Type Name Description
    ScoreSettingsCreator.Input input
    Returns
    Type Description
    SerenityCreationValidationResult
    In this article
    © 2026 Serenity. All Rights Reserved