logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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
    object
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>
    BatchSoundEffectImportWindow
    Namespace: Serenity.AudioPlayer.Infrastructure.Settings.Editor.Builder
    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
    Type Description
    IReadOnlyList<string>
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.AudioExtensions

    DefaultOutputFolder

    Declaration
    protected override string DefaultOutputFolder { get; }
    Property Value
    Type Description
    string
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.DefaultOutputFolder

    Labels

    Declaration
    protected override BatchAudioImportWindowLabels Labels { get; }
    Property Value
    Type Description
    BatchAudioImportWindowLabels
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.Labels

    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
    Type Name Description
    BatchSoundEffectImporter.Item item
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.ApplyNewItemDefaults(BatchSoundEffectImporter.Item)

    Create(Input)

    Declaration
    protected override BatchSoundEffectImporter.Result Create(BatchSoundEffectImporter.Input input)
    Parameters
    Type Name Description
    BatchSoundEffectImporter.Input input
    Returns
    Type Description
    BatchSoundEffectImporter.Result
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.Create(BatchSoundEffectImporter.Input)

    DrawExtraOptionsSection()

    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
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.DrawExtraOptionsSection()

    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
    Type Name Description
    int index
    BatchSoundEffectImporter.Item item
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.DrawItemRow(int, BatchSoundEffectImporter.Item)

    FindDuplicateIds(IEnumerable<Item>)

    Declaration
    protected override List<string> FindDuplicateIds(IEnumerable<BatchSoundEffectImporter.Item> items)
    Parameters
    Type Name Description
    IEnumerable<BatchSoundEffectImporter.Item> items
    Returns
    Type Description
    List<string>
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.FindDuplicateIds(IEnumerable<BatchSoundEffectImporter.Item>)

    ImportExternalAudioFile(string, string, out string)

    Declaration
    protected override AudioClip ImportExternalAudioFile(string osPath, string destinationFolder, out string error)
    Parameters
    Type Name Description
    string osPath
    string destinationFolder
    string error
    Returns
    Type Description
    AudioClip
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.ImportExternalAudioFile(string, string, out string)

    IsAudioFile(string)

    Declaration
    protected override bool IsAudioFile(string path)
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    bool
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.IsAudioFile(string)

    ItemFromClip(AudioClip)

    Declaration
    protected override BatchSoundEffectImporter.Item ItemFromClip(AudioClip clip)
    Parameters
    Type Name Description
    AudioClip clip
    Returns
    Type Description
    BatchSoundEffectImporter.Item
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.ItemFromClip(AudioClip)

    Open()

    Declaration
    public static void Open()

    Validate(Input)

    Declaration
    protected override string Validate(BatchSoundEffectImporter.Input input)
    Parameters
    Type Name Description
    BatchSoundEffectImporter.Input input
    Returns
    Type Description
    string
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.Validate(BatchSoundEffectImporter.Input)

    ValidateItem(Item)

    Declaration
    protected override string ValidateItem(BatchSoundEffectImporter.Item item)
    Parameters
    Type Name Description
    BatchSoundEffectImporter.Item item
    Returns
    Type Description
    string
    Overrides
    BatchAudioImportWindow<BatchSoundEffectImporter.Item, BatchSoundEffectImporter.Input, BatchSoundEffectImporter.Result, UnityAudioPlayerClipDefinition>.ValidateItem(BatchSoundEffectImporter.Item)
    In this article
    © 2026 Serenity. All Rights Reserved