Class BatchSoundEffectImportWindow
Wizard window (Tools ▸ Serenity ▸ Create ▸ Audio ▸ Batch Import Sound Effects) for importing and
configuring many sound effects at once. The user drops or adds audio files, reviews/edits the
per-item rows, applies common defaults, then creates one UnityAudioPlayerClipDefinition
per effect. All logic lives in BatchSoundEffectImporter; the shared IMGUI scaffolding
(destination folders, drop zone, item list, summary/create) lives in
BatchAudioImportWindow<TItem, TInput, TResult, TAsset>; this window supplies only what is
specific to sound effects: its own copy, the Priority/PriorityPolicy/CanBeReplaced and spatial settings row fields
and their "Common Defaults" section.
Inheritance
BatchSoundEffectImportWindow
Assembly: Serenity.UnityAudioPlayer.Infrastructure.Editor.dll
Syntax
public sealed class BatchSoundEffectImportWindow : BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>
Constructors
BatchSoundEffectImportWindow()
Declaration
public BatchSoundEffectImportWindow()
Properties
AudioExtensions
Declaration
protected override IReadOnlyList<string> AudioExtensions { get; }
Property Value
Overrides
DefaultOutputFolder
Declaration
protected override string DefaultOutputFolder { get; }
Property Value
Overrides
Labels
Declaration
protected override BatchAudioImportWindowLabels Labels { get; }
Property Value
Overrides
Methods
ApplyNewItemDefaults(Item)
Applies this window's own "new row" defaults to a freshly added item (e.g. sound effects'
Priority/Policy/CanBeReplaced fields, music's default artist).
Declaration
protected override void ApplyNewItemDefaults(BatchSoundEffectImporter.Item item)
Parameters
Overrides
Declaration
protected override BatchSoundEffectImporter.Result Create(BatchSoundEffectImporter.Input input)
Parameters
Returns
Overrides
The "Common Defaults" box the sound-effect window bolts on after the sources section —
owns its own trailing spacing to reproduce the two gaps (before and after this box) the original
hand-rolled window had; the base's own gap before this call supplies the first one.
Declaration
protected override void DrawExtraOptionsSection()
Overrides
DrawItemRow(int, Item)
Draws the fields specific to one item's row, between the common Include/clip/remove header
and the common validation message.
Declaration
protected override void DrawItemRow(int index, BatchSoundEffectImporter.Item item)
Parameters
Overrides
FindDuplicateIds(IEnumerable<Item>)
Declaration
protected override List<string> FindDuplicateIds(IEnumerable<BatchSoundEffectImporter.Item> items)
Parameters
Returns
Overrides
ImportExternalAudioFile(string, string, out string)
Declaration
protected override AudioClip ImportExternalAudioFile(string osPath, string destinationFolder, out string error)
Parameters
Returns
| Type |
Description |
| AudioClip |
|
Overrides
IsAudioFile(string)
Declaration
protected override bool IsAudioFile(string path)
Parameters
| Type |
Name |
Description |
| string |
path |
|
Returns
Overrides
ItemFromClip(AudioClip)
Declaration
protected override BatchSoundEffectImporter.Item ItemFromClip(AudioClip clip)
Parameters
| Type |
Name |
Description |
| AudioClip |
clip |
|
Returns
Overrides
Open()
Declaration
public static void Open()
Declaration
protected override string Validate(BatchSoundEffectImporter.Input input)
Parameters
Returns
Overrides
ValidateItem(Item)
Declaration
protected override string ValidateItem(BatchSoundEffectImporter.Item item)
Parameters
Returns
Overrides