Class SoundMixerSettingsCreator
Generates (or updates) the project-wide UnitySoundMixerSettings asset from a single
description. Runs on SingletonSettingsCreationEngine<TSettings, TInput, TResult>: this class
stays the caller-facing static surface — Input/Result DTOs, ValidateIdentity/Validate/Create,
ResolveSettingsContext<TSettings>(string, string) for "edit existing" detection —
and forwards every member to one SoundMixerSettingsCreator.Engine instance that supplies the module's own fields.
CreateSoundMixerSettingsWindow only collects input and renders results; every asset
mutation lives in the engine.
Two fields carry rerun-safe MERGE contracts instead of a plain overwrite, because both can be authored
outside this wizard: EffectLoops is UNIONED (by reference) with the asset's existing
list on update — see Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Engine.MergeEffectLoops(System.Collections.Generic.List{Serenity.SoundMixer.Installation.Settings.UnitySoundMixerEffectLoopDefinition},System.Collections.Generic.List{Serenity.SoundMixer.Installation.Settings.UnitySoundMixerEffectLoopDefinition}) — and ExposedParameters is
applied as authoritative only for the parameter names it contains, keeping any existing row whose name
the input does not mention — see Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Engine.MergeExposedParameters(System.Collections.Generic.List{Serenity.Global.Domain.Entities.ConfigurationEntry},System.Collections.Generic.List{Serenity.Global.Domain.Entities.ConfigurationEntry}). Both merges run only on
Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Engine.ApplyFieldsToExisting(Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Input,Serenity.SoundMixer.Installation.Settings.UnitySoundMixerSettings), the update-only override of Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Engine.ApplyFields(Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Input,Serenity.SoundMixer.Installation.Settings.UnitySoundMixerSettings):
a brand-new asset has nothing to merge into, so Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Engine.ApplyFields(Serenity.SoundMixer.Installation.Settings.Editor.Builder.SoundMixerSettingsCreator.Input,Serenity.SoundMixer.Installation.Settings.UnitySoundMixerSettings) assigns the incoming
lists as-is, same as every other field.
Inheritance
SoundMixerSettingsCreator
Assembly: Serenity.UnitySoundMixer.Installation.Editor.dll
Syntax
public static class SoundMixerSettingsCreator
Fields
DefaultAssetName
File name (without extension) for a brand-new settings asset when the caller names none.
Declaration
public const string DefaultAssetName = "SoundMixerSettings"
Field Value
DefaultId
Identifier written onto a brand-new settings asset when the caller names none.
Declaration
public const string DefaultId = "SoundMixer"
Field Value
DefaultLowestAudioMixerDecibels
These four defaults — through DefaultMaximumAudioMixerDecibels — mirror the exact
values on the package's own shipped reference asset,
Assets/Serenity/Media/SoundMixer/SoundMixerSettings.asset — the configuration Serenity's own
demos and docs already exhibit — because UnitySoundMixerSettings declares no field
initializers of its own (a bare Assets ▸ Create asset is all zeros, which fails this
creator's own min-less-than-max validation). SoundMixerSettingsCreator.Input's field initializers, the wizard
window's serialized field initializers, and the test fixture all reference these constants instead
of repeating the numbers, so a retune of the shipped asset only ever needs to change one place.
Retune these four together with the shipped asset if it is ever retuned.
Declaration
public const float DefaultLowestAudioMixerDecibels = -44
Field Value
DefaultMaximumAudioMixerDecibels
These four defaults — through DefaultMaximumAudioMixerDecibels — mirror the exact
values on the package's own shipped reference asset,
Assets/Serenity/Media/SoundMixer/SoundMixerSettings.asset — the configuration Serenity's own
demos and docs already exhibit — because UnitySoundMixerSettings declares no field
initializers of its own (a bare Assets ▸ Create asset is all zeros, which fails this
creator's own min-less-than-max validation). SoundMixerSettingsCreator.Input's field initializers, the wizard
window's serialized field initializers, and the test fixture all reference these constants instead
of repeating the numbers, so a retune of the shipped asset only ever needs to change one place.
Retune these four together with the shipped asset if it is ever retuned.
Declaration
public const float DefaultMaximumAudioMixerDecibels = 3
Field Value
DefaultMaximumSelectableValue
These four defaults — through DefaultMaximumAudioMixerDecibels — mirror the exact
values on the package's own shipped reference asset,
Assets/Serenity/Media/SoundMixer/SoundMixerSettings.asset — the configuration Serenity's own
demos and docs already exhibit — because UnitySoundMixerSettings declares no field
initializers of its own (a bare Assets ▸ Create asset is all zeros, which fails this
creator's own min-less-than-max validation). SoundMixerSettingsCreator.Input's field initializers, the wizard
window's serialized field initializers, and the test fixture all reference these constants instead
of repeating the numbers, so a retune of the shipped asset only ever needs to change one place.
Retune these four together with the shipped asset if it is ever retuned.
Declaration
public const int DefaultMaximumSelectableValue = 100
Field Value
DefaultMinimumSelectableValue
These four defaults — through DefaultMaximumAudioMixerDecibels — mirror the exact
values on the package's own shipped reference asset,
Assets/Serenity/Media/SoundMixer/SoundMixerSettings.asset — the configuration Serenity's own
demos and docs already exhibit — because UnitySoundMixerSettings declares no field
initializers of its own (a bare Assets ▸ Create asset is all zeros, which fails this
creator's own min-less-than-max validation). SoundMixerSettingsCreator.Input's field initializers, the wizard
window's serialized field initializers, and the test fixture all reference these constants instead
of repeating the numbers, so a retune of the shipped asset only ever needs to change one place.
Retune these four together with the shipped asset if it is ever retuned.
Declaration
public const int DefaultMinimumSelectableValue = 0
Field Value
DefaultOutputFolder
Default output folder for a brand-new settings asset — under the game's content root,
matching every other singleton settings creator (ScoreSettingsCreator, GameSaveCreator).
Declaration
public const string DefaultOutputFolder = "Assets/Game/Media/SoundMixer"
Field Value
Methods
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; 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 SoundMixerSettingsCreator.Result Create(SoundMixerSettingsCreator.Input input)
Parameters
Returns
ReadMixerExposedParameterNames(AudioMixer)
Reads the exposed-parameter names present on audioMixer right now, via
GetExposedParameters(YamlStream) over the mixer asset's own YAML — the same
reader UnitySoundMixerSettingsEditor's on-disk fallback uses. Returns null (never throws)
when the mixer is unassigned or its YAML could not be read/parsed: a diagnostic-only read, used by
both the engine's audio-mixer warning and the wizard's "Read exposed parameters from the mixer"
button, neither of which should block on a read failure.
Declaration
public static List<string> ReadMixerExposedParameterNames(AudioMixer audioMixer)
Parameters
| Type |
Name |
Description |
| AudioMixer |
audioMixer |
|
Returns
ResolveSettingsContext(string)
Declaration
public static SettingsAssetAuthoring.SettingsResolution<UnitySoundMixerSettings> ResolveSettingsContext(string explicitSettingsAssetPath = "")
Parameters
| Type |
Name |
Description |
| string |
explicitSettingsAssetPath |
|
Returns
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(SoundMixerSettingsCreator.Input input)
Parameters
Returns
| Type |
Description |
| SerenityCreationValidationResult |
|
Id-only validation, usable before a folder choice has been made.
Declaration
public static SerenityCreationValidationResult ValidateIdentity(SoundMixerSettingsCreator.Input input)
Parameters
Returns
| Type |
Description |
| SerenityCreationValidationResult |
|