Class AudioMixerEffectLoopCreator
Editor-only service that performs the actual AudioMixer modification for an "effect loop" group. Contains NO UI code — it takes a CreateAudioMixerEffectLoopInput and returns a CreateAudioMixerEffectLoopOutput, so it can be unit-driven or reused independently of the EditorWindow.
What it builds. Under the chosen parent group it creates one new group whose effect chain is, in order:
- Receive — the routing destination (added at index 0).
- the user's selected effects, in the exact requested order.
- Attenuation — the group's wet/output volume stage. This is created automatically by
Unity's
CreateNewGroupflow and is intentionally LEFT as the final stage; a second Attenuation is never added.
Routing usage (Receive side only). This tool builds only the RECEIVE side of a Send/Receive loop. It never modifies any group other than the new loop group and its parent link. To route audio into the loop, the user must afterwards select a source group (e.g. SFX or Voice) in the Audio Mixer window, add a Send effect to it, and point that Send at this loop group's Receive. The source Send's wet level controls how much signal is routed in; this loop's trailing Attenuation controls the overall returned wet level. Automatic Send wiring is deliberately out of scope (a possible future feature).
Failure policy. Never throws to the caller: all errors (including internal-API reflection failures) are returned as a failed CreateAudioMixerEffectLoopOutput so the UI can show a clear message. Nothing fails silently.
Inherited Members
Namespace: Serenity.SoundMixer.Infrastructure.AudioMixerEffectLoop.Editor
Assembly: Serenity.UnitySoundMixer.Infrastructure.Editor.dll
Syntax
public static class AudioMixerEffectLoopCreator
Fields
SafeNameRegex
Allowed characters for a loop group name (safe for Unity group/asset naming).
Declaration
public static readonly Regex SafeNameRegex
Field Value
| Type | Description |
|---|---|
| Regex |
Methods
Create(CreateAudioMixerEffectLoopInput)
Creates the effect-loop group described by input.
Declaration
public static CreateAudioMixerEffectLoopOutput Create(CreateAudioMixerEffectLoopInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAudioMixerEffectLoopInput | input |
Returns
| Type | Description |
|---|---|
| CreateAudioMixerEffectLoopOutput |
Validate(CreateAudioMixerEffectLoopInput)
Validates an input. Returns the first failing rule's message, or null when the input is valid. Shared by the service and reusable by the UI to keep validation in one place.
Declaration
public static string Validate(CreateAudioMixerEffectLoopInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAudioMixerEffectLoopInput | input |
Returns
| Type | Description |
|---|---|
| string |