From 07c844cd94e17ab6b66a59a06628d2182d2a3bf3 Mon Sep 17 00:00:00 2001 From: Firerise9402 <90978630+Firerise9402@users.noreply.github.com> Date: Wed, 13 Dec 2023 10:47:13 -0500 Subject: [PATCH] Fixed bugs related to resetting the window location while toggled off, and the setting being stored incorrectly initially compared to the gui visual. --- Assets/Scripts/PersistentDataManager.cs | 2 +- Assets/Scripts/WindowController.cs | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/PersistentDataManager.cs b/Assets/Scripts/PersistentDataManager.cs index 2b8019530..5ffb2b521 100644 --- a/Assets/Scripts/PersistentDataManager.cs +++ b/Assets/Scripts/PersistentDataManager.cs @@ -38,7 +38,7 @@ namespace HeavenStudio.Common false, true, true, - true + false ); // disable if platform is mac diff --git a/Assets/Scripts/WindowController.cs b/Assets/Scripts/WindowController.cs index 12683850b..d41b0e57e 100644 --- a/Assets/Scripts/WindowController.cs +++ b/Assets/Scripts/WindowController.cs @@ -216,7 +216,15 @@ namespace HeavenStudio pan = defaultPan; scale = defaultScale; shakeResult = defaultShake; - GlobalGameManager.ChangeScreenSize(); + #if UNITY_EDITOR + return; + #else + if(Application.isEditor || !Editor.Editor.instance.fullscreen || !Conductor.instance.isPlaying) return; + if(PersistentDataManager.gameSettings.windowDanceEnable) + { + GlobalGameManager.ChangeScreenSize(); + } + #endif } } } \ No newline at end of file