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. Runs on SingletonSettingsCreationEngine<TSettings, TInput, TResult>: this class stays the caller-facing static surface — Input/Result DTOs, Validate/ValidateIdentity/Create — and forwards every member to one ScoreSettingsCreator.Engine instance that supplies the module's own fields. CreateScoreSettingsWindow only collects input and renders results; every asset mutation lives in the engine.

    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

    DefaultAssetName

    Asset-name fallback for a brand-new settings asset, used both as the field default and wherever a blank asset name needs sanitizing into a safe file name.

    Declaration
    public const string DefaultAssetName = "ScoreSettings"
    Field Value
    Type Description
    string

    DefaultId

    Identifier written onto a brand-new settings asset when the caller names none.

    Declaration
    public const string DefaultId = "Score"
    Field Value
    Type Description
    string

    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 Initialize Serenity wizard 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 Input.ExistingSettingsAssetPath or creates a brand-new one. On any failure during creation every mutation is rolled back so the project is left untouched.

    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, 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