logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AudioPlayerSettingsCreator

    Generates (or updates) one UnityAudioPlayerSettings asset — a Serenity audio channel — from validated input, resolved by Id within OutputFolderPath. Mirrors Serenity.Character.Infrastructure.Editor.Builder.CharacterConfigCreator's per-instance shape: static class, Input/Result DTOs, ValidateIdentity/Validate/Create, transaction-based rollback on failure.

    Absorbs the duplicate channel-creation path that used to live on Serenity.SoundMixer.Infrastructure.RelationshipManager.Editor.AudioChannelCreator, which resolved same-Id clashes via UnityEditor.AssetDatabase.GenerateUniqueAssetPath(System.String) — silently producing a second Foo 1.asset instead of editing the channel the author meant. Routing both the Relationship Manager's Create Channel section and any future wizard through ResolveOrCreateByIdInFolder<TSettings>(string, string, string, SerenityAssetCreationTransaction, out bool) means the same Id in the same folder always updates the one asset in place.

    Inheritance
    object
    AudioPlayerSettingsCreator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.AudioPlayer.Infrastructure.Settings.Editor.Builder
    Assembly: Serenity.UnityAudioPlayer.Infrastructure.Editor.dll
    Syntax
    public static class AudioPlayerSettingsCreator

    Fields

    DefaultOutputFolder

    Folder a new channel's settings asset is created under when the caller names none — the exact folder AudioChannelCreator.DefaultChannelOutputFolder already pointed at, kept as one declaration so the Relationship Manager and any future wizard land in the same place.

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

    MinimumChannels

    Fewest channels a settings asset may declare (public — the wizard window clamps its input to this same bound).

    Declaration
    public const uint MinimumChannels = 1
    Field Value
    Type Description
    uint

    Methods

    Create(Input)

    Validates the request, then resolves-or-creates the channel settings asset by Id within OutputFolderPath and applies every field. On any failure every mutation is rolled back so the project is left untouched.

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

    Validate(Input)

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

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

    ValidateIdentity(Input)

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

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