From 3ef6fef28934ed5bb7a68e2b29a5285fa5c39b94 Mon Sep 17 00:00:00 2001 From: SHAM-DP Date: Fri, 10 Mar 2023 18:07:40 +0800 Subject: [PATCH] fix for options slider --- Assets/Scripts/UI/SC_Options.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Assets/Scripts/UI/SC_Options.cs b/Assets/Scripts/UI/SC_Options.cs index bccc0317..5020af91 100644 --- a/Assets/Scripts/UI/SC_Options.cs +++ b/Assets/Scripts/UI/SC_Options.cs @@ -31,7 +31,6 @@ namespace SHADE_Scripting.UI if (mv != null) { mv.ScaledValue = Settings.masterVolume; - } if (sfx != null) { @@ -68,19 +67,19 @@ namespace SHADE_Scripting.UI if (mv != null) { - Settings.masterVolume = mv.ScaledValue * 0.01f; - SHADE.Audio.SetVCAVolume("vca:/MASTER", Settings.masterVolume); + Settings.masterVolume = mv.ScaledValue; + SHADE.Audio.SetVCAVolume("vca:/MASTER", Settings.masterVolume * 0.01f); } if (sfx != null) { - Settings.sfxVolume = sfx.ScaledValue * 0.01f; - SHADE.Audio.SetVCAVolume("vca:/SFX", Settings.sfxVolume); - SHADE.Audio.SetVCAVolume("vca:/UI", Settings.sfxVolume); + Settings.sfxVolume = sfx.ScaledValue; + SHADE.Audio.SetVCAVolume("vca:/SFX", Settings.sfxVolume * 0.01f); + SHADE.Audio.SetVCAVolume("vca:/UI", Settings.sfxVolume * 0.01f); } if (bgm != null) { - Settings.bgmVolume = bgm.ScaledValue * 0.01f; - SHADE.Audio.SetVCAVolume("vca:/MUSIC", Settings.bgmVolume); + Settings.bgmVolume = bgm.ScaledValue; + SHADE.Audio.SetVCAVolume("vca:/MUSIC", Settings.bgmVolume * 0.01f); } if (fov != null) {