logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class GameCameraSettingsCreator

    Generates (or updates) the project-wide UnityGameCameraSettings asset from a single description. Mirrors Serenity.GameProgress.Infrastructure.Editor.Builder.GameProgressCreator and Serenity.GameSave.Infrastructure.Editor.Builder.GameSaveCreator: static class, Input/Result DTOs, Validate, Create with created-paths rollback on failure — resolved and folder-provisioned through the shared SettingsAssetAuthoring engine rather than a private copy of its logic.

    Unlike GameProgress/GameSave — which treat more than one project-wide settings asset as a hard error because they enforce a true single-instance identity — a second UnityGameCameraSettings asset does not break the GameCamera installer (it loads every asset tagged module:game-camera and uses the first one found); ambiguity here is surfaced as a warning instead of blocking the run.

    CreateGameCameraSettingsWindow only collects input and renders results; every asset mutation lives here.
    Inheritance
    object
    GameCameraSettingsCreator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameCamera.Infrastructure.Editor.Builder
    Assembly: Serenity.UnityGameCamera.Infrastructure.Editor.dll
    Syntax
    public static class GameCameraSettingsCreator

    Fields

    DefaultOutputFolder

    Folder a brand-new settings asset is created under when the caller names none.

    Declaration
    public const string DefaultOutputFolder = "Assets/Game/Media/GameCamera"
    Field Value
    Type Description
    string

    SettingsAssetFileNameFallback

    Fallback file name for the settings asset when Id sanitizes to nothing usable — passed to FileNameSafe(string, string) alongside CreateGameCameraSettingsWindow's own target-section path preview, so both compute the exact same planned file name.

    Declaration
    public const string SettingsAssetFileNameFallback = "GameCameraSettings"
    Field Value
    Type Description
    string

    Methods

    Create(Input)

    Validates the request, then resolves-or-creates the settings asset and applies every field to it. On any failure every mutation is rolled back through the transaction's existing-asset restores: an already-existing asset that was being edited has its pre-call field values restored, and created paths are deleted.

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

    ResolveSettingsContext(string)

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

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

    Validate(Input)

    Validates the request: a non-empty Id, and either a resolvable existing asset or a well-formed destination folder for a fresh one. A project-wide search turning up more than one existing asset is surfaced as a warning (see the ambiguity note on the type), never an error.

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