From a02b7d4a1ad4c02c429e17a49d6b19110e26cc9f Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Sun, 17 Aug 2025 11:58:42 -0500 Subject: [PATCH] Add events for when audio settings are changed for the game window. --- Source/Editor/Windows/GameWindow.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs index acb2deda3..12897eb3c 100644 --- a/Source/Editor/Windows/GameWindow.cs +++ b/Source/Editor/Windows/GameWindow.cs @@ -63,6 +63,16 @@ namespace FlaxEditor.Windows }, }; + /// + /// Fired when the game window audio is muted. + /// + public event Action MuteAudio; + + /// + /// Fired when the game window master audio volume is changed. + /// + public event Action MasterVolumeChanged; + /// /// Gets the viewport. /// @@ -120,6 +130,7 @@ namespace FlaxEditor.Windows { Audio.MasterVolume = value ? 0 : AudioVolume; _audioMuted = value; + MuteAudio?.Invoke(); } } @@ -134,6 +145,7 @@ namespace FlaxEditor.Windows if (!AudioMuted) Audio.MasterVolume = value; _audioVolume = value; + MasterVolumeChanged?.Invoke(value); } }