Class UnitySoundMixerEffectLoopDefinitionFactory
Inheritance
UnitySoundMixerEffectLoopDefinitionFactory
Assembly: Serenity.UnitySoundMixer.Infrastructure.Editor.dll
Syntax
public static class UnitySoundMixerEffectLoopDefinitionFactory
Fields
DefaultOutputFolder
Folder a brand-new effect loop definition asset is created under when the caller names none.
Declaration
public const string DefaultOutputFolder = "Assets/Game/Media/Audio/EffectLoops"
Field Value
LoopIdRegex
Allowed characters for a loop id/key (a routing key: letters, digits, '_' and '-', no spaces).
Declaration
public static readonly Regex LoopIdRegex
Field Value
Methods
Creates the definition asset described by input, creating its destination
folder first when it does not exist yet.
Declaration
public static CreateSoundMixerEffectLoopDefinitionOutput Create(CreateSoundMixerEffectLoopDefinitionInput input, ICollection<string> createdFolderPaths = null)
Parameters
| Type |
Name |
Description |
| CreateSoundMixerEffectLoopDefinitionInput |
input |
What to create and where.
|
| ICollection<string> |
createdFolderPaths |
Receives every folder this call creates, so a caller's rollback can
remove them again — pass Serenity.Global.Infrastructure.Editor.SerenityAssetCreationTransaction.FolderTracking.
|
Returns
FindExistingDefinitionPathById(string)
Scans all existing definition assets and returns the path of one whose Id matches
loopId, or null if none. Public (not private) so CreateAudioMixerEffectLoopWindow
can resolve the loop its Loop Id names the moment it is typed — to update it in place, or to block the
Loop step when it cannot — instead of only after Create(CreateSoundMixerEffectLoopDefinitionInput, ICollection<string>) refuses it at commit time.
Declaration
public static string FindExistingDefinitionPathById(string loopId)
Parameters
| Type |
Name |
Description |
| string |
loopId |
|
Returns
NextFreeLoopId(string)
The first Loop Id at or after desiredLoopId — the Id itself, then the Id
with an underscored number — that no definition in the project owns: what a fresh run of the wizard
starts from, so "Create Another" does not open on the loop it just created.
Declaration
public static string NextFreeLoopId(string desiredLoopId)
Parameters
| Type |
Name |
Description |
| string |
desiredLoopId |
|
Returns
Writes input's editable fields — display name, description, default wet and, when the
input carries routes, the sources — onto existing in place. The loop group, mixer, Id
and effect list stay as they are: they describe a group already on the mixer, which an update does not
rebuild. A source still routed keeps the exposed parameter names a sync already wrote onto it; one no
longer routed is dropped with a warning, since its Send stays on the mixer. The caller captures
existing for rollback BEFORE calling this. Never throws to the caller.
Declaration
public static CreateSoundMixerEffectLoopDefinitionOutput UpdateExisting(UnitySoundMixerEffectLoopDefinition existing, CreateSoundMixerEffectLoopDefinitionInput input)
Parameters
Returns
Validates a request. Returns the first failing rule's message, or null when valid. Reusable by
the UI to gate the Create button.
Declaration
public static string Validate(CreateSoundMixerEffectLoopDefinitionInput input)
Parameters
Returns