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
AudioPlayerSettingsCreator
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
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
Methods
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
Returns
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
Returns
| Type |
Description |
| SerenityCreationValidationResult |
|
Id-only validation, usable before a folder choice has been made.
Declaration
public static SerenityCreationValidationResult ValidateIdentity(AudioPlayerSettingsCreator.Input input)
Parameters
Returns
| Type |
Description |
| SerenityCreationValidationResult |
|