From 7548eebc5bf61c9cd2459022927cbb492e1573a7 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Fri, 6 Jun 2025 00:03:00 -0700 Subject: [PATCH] Web changes --- Assets/Scripts/LoadingMenu.cs | 7 +++++-- Assets/Scripts/SettingsMenu.cs | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/LoadingMenu.cs b/Assets/Scripts/LoadingMenu.cs index e68725c..72b0c01 100644 --- a/Assets/Scripts/LoadingMenu.cs +++ b/Assets/Scripts/LoadingMenu.cs @@ -27,12 +27,12 @@ public class LoadingMenu : MonoBehaviour PlayerPrefs.DeleteKey("HighScore"); } QualitySettings.vSyncCount = PlayerPrefs.GetInt("Setting3", 1) == 1 ? 1 : -1; - Screen.fullScreen = PlayerPrefs.GetInt("Setting1", 1) == 1; - if (!Application.isMobilePlatform) + if (!Application.isMobilePlatform && Application.platform != RuntimePlatform.WebGLPlayer) { SetIfNone("Setting1", 1); SetIfNone("Setting2", 0); SetIfNone("Setting3", 1); + Screen.fullScreen = PlayerPrefs.GetInt("Setting1", 1) == 1; } else { @@ -41,6 +41,9 @@ public class LoadingMenu : MonoBehaviour SetIfNone("Setting3", 1, true); Application.targetFrameRate = 360; QualitySettings.vSyncCount = 0; + if (Application.platform == RuntimePlatform.WebGLPlayer) { + Screen.fullScreen = false; + } } PlayerPrefs.SetString("latestVersion", Application.version); updateButton.onClick.AddListener(() => diff --git a/Assets/Scripts/SettingsMenu.cs b/Assets/Scripts/SettingsMenu.cs index 93a9857..aab27be 100644 --- a/Assets/Scripts/SettingsMenu.cs +++ b/Assets/Scripts/SettingsMenu.cs @@ -13,7 +13,7 @@ public class SettingsMenu : MonoBehaviour { musicSlider.value = PlayerPrefs.GetFloat("musicVolume", 1f); sfxSlider.value = PlayerPrefs.GetFloat("sfxVolume", 1f); - if (!Application.isMobilePlatform) + if (!Application.isMobilePlatform && Application.platform != RuntimePlatform.WebGLPlayer) { setting1toggle.isOn = PlayerPrefs.GetInt("Setting1", 1) == 1; setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1; @@ -24,6 +24,10 @@ public class SettingsMenu : MonoBehaviour setting1toggle.interactable = false; setting2toggle.isOn = PlayerPrefs.GetInt("Setting2", 0) == 1; setting3toggle.interactable = false; + if (Application.platform == RuntimePlatform.WebGLPlayer) + { + setting1toggle.isOn = false; + } } setting1toggle.onValueChanged.AddListener(value => {