EditorAudioUtils
EditorAudioUtils copied to clipboard
[Suggestion] Also add sound for compiler errors
Hey there, first of really cool tool! I very much agree on the Unity Editor lacking a bit on sounds notifications especially for failing/succeeding builds you let run in the background and that take a while. And your solution is even also custom adjustable for each local user 🤩
Just a small idea for an extension on top - I did this modification for me locally:
-
Also add sounds for a failing compilation. For example like
public static class CompilerNotifications { [InitializeOnLoadMethod] private static void Init() { CompilationPipeline.assemblyCompilationFinished -= ProcessBatchModeCompileFinish; CompilationPipeline.assemblyCompilationFinished += ProcessBatchModeCompileFinish; } private static void ProcessBatchModeCompileFinish(string s, CompilerMessage[] compilerMessages) { if (compilerMessages.Any(m => m.type == CompilerMessageType.Error)) { EditorAudioUtility.PlayCompilerNotificationSound(EditorNotificationSound.Error); } } } -
[optional] And then optionally I also added according enabled flag - so two different flags (either bools or enum flag). I therefore also split out the
PlayNotificationSoundintoPlayBuildNotificationSoundandPlayCompilerNotificationSound. Might be fine as well though to just stick to a central single one.
Heya @jerome-poenisch ,
Very nice addition. I added your suggestion to version 1.2.0 - With success and fail sounds for compilation and builds.