EditorAudioUtils
EditorAudioUtils copied to clipboard
Customizable Unity Editor notification sounds - Like EditorApplication.Beep() but configurable
EditorAudioUtils
Like EditorApplication.Beep(), but with configurable sounds

Installation
Install the package with OpenUPM
$ openupm add com.jd.editoraudioutils
or download the Latest Unity Packages
Features
- Set your own notification sounds through Project Settings -> EditorAudioUtils
- Play custom notification sounds through a simple API
- Play, Pause, Resume and stop any AudioClip in the editor without the need of an AudioSource
- Handle different internal Unity API from Unity 2019 onwards
- Disable or overwrite notification sounds through EditorPrefs. This way each user can decide if and what notification settings they want, while the project itself contains the default settings.
API
Play a predefined notification sound:
EditorAudioUtility.PlayNotificationSound(EditorNotificationSound type);
Access other internal AudioUtil methods (EditorAudioUtility):
// Play clip
EditorAudioUtility.PlayPreviewClip(AudioClip audioClip);
EditorAudioUtility.PlayPreviewClip(AudioClip audioClip, int startSample, bool loop);
// For Unity 2020+ the input will be ignored and applied to all clips
// You can use EditorAudioUtility.LastPlayedPreviewClip to get the last clip
EditorAudioUtility.PausePreviewClip(AudioClip audioClip);
EditorAudioUtility.ResumePreviewClip(AudioClip audioClip);
EditorAudioUtility.StopPreviewClip(AudioClip audioClip);
// Stop all clips
EditorAudioUtility.StopAllPreviewClips();
License
- MIT - see LICENSE
- Sounds in Sample are from Kenney (CC0)