A simple editor window for Unity that allows you to load and play multiple audio clips directly from the Unity editor. This tool is helpful for game developers and sound designers who need to quickly preview audio files without the need to run the game or manually assign clips to objects.
- Load multiple audio clips from a selected folder within the Unity project.
- Preview audio clips directly within the editor without playing the game.
- Supports looping audio playback.
- Remove individual audio clips or clear the entire list with one click.
- Stop playback of all clips at any time.
When developing games or working with large audio assets, it can be tedious to manually assign and play clips within the scene, especially for testing purposes. This tool allows you to:
- Quickly browse and preview multiple audio clips without running your game.
- Organize your audio assets by loading clips directly from specific folders.
- Save time and effort by providing a simple UI for playback, looping, and stopping audio clips.
Whether you're a game developer or sound designer, this tool can simplify the process of working with large collections of audio files in Unity.
- Download or clone this repository to your Unity project.
- Copy the
AudioClipPlayerWindow
script to yourEditor
folder in Unity (if the folder doesn't exist, create one). - Once the script is in your project, Unity will automatically compile it and make the new editor window available.
- Open Unity and go to
RimuruDev Tools
in the top menu bar. - Click on
Audio Clip Player
to open the tool. - In the window that appears:
- Click
Select Folder and Load Audio Clips
to choose a folder containing audio files. - The tool will automatically find and display all audio clips in the selected folder.
- Click
- From here, you can:
- Play individual clips by clicking the
Play
button next to each one. - Remove clips from the list using the
Remove
button. - Enable looping for audio playback by checking the
Loop
checkbox. - Clear all clips by pressing the
Clear All
button. - Stop all currently playing clips by pressing the
Stop All
button.
- Play individual clips by clicking the
Let's say you are a sound designer working on a game with hundreds of sound effects. You need to quickly review a large number of sound effects without the hassle of creating game objects or scripts for each sound.
- You would need to manually assign each audio file to an
AudioSource
in a scene. - You'd have to hit play and test them one by one.
- If you had to test many files, this process would become very time-consuming.
- Load all audio files from a specific folder with one click.
- Quickly listen to each sound effect directly in the editor.
- Easily loop or stop sounds as needed for quick iteration.
This tool is especially useful when you are managing many sound assets or need to quickly review and sort through them.
- The tool uses Unity's
EditorWindow
class to create a custom window in the editor. - When you select a folder, the script uses
AssetDatabase.FindAssets
to find all audio clips (t:AudioClip
) in that folder. - Clips are displayed in a scrollable list, where you can play, loop, or remove them.
- Playback is handled by dynamically creating an
AudioSource
in the editor (which is hidden from the hierarchy view).
- Only works in the Unity Editor: This tool is specifically designed to aid developers during the development process and will not work in a built version of the game.
- Large folders may cause performance issues: If you load a folder with a very large number of audio clips, the editor may slow down. It is recommended to organize audio files into manageable folders.
This project is licensed under the MIT License. See the LICENSE file for details.