From fd52ed606c070097ccc67cbe9c9267b8c72353bb Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Sun, 30 Oct 2022 13:16:01 +1100 Subject: [PATCH] Add note to restart game when changing to windowed on Linux --- MOD.Scripts.UI/MODMenuResolution.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/MOD.Scripts.UI/MODMenuResolution.cs b/MOD.Scripts.UI/MODMenuResolution.cs index cc7e4a05..9243113b 100644 --- a/MOD.Scripts.UI/MODMenuResolution.cs +++ b/MOD.Scripts.UI/MODMenuResolution.cs @@ -24,6 +24,16 @@ public void OnBeforeMenuVisible() public void OnGUI() { + Label($"Resolution Settings (Current: {Screen.width}x{Screen.height})"); + + // I noticed a bug on Linux where going Windowed sometimes doesn't let you change window size, + // probably due res settings Playerprefs that Unity reads on startup. + // Restarting the game after changing settings fixes this. + if(Application.platform == RuntimePlatform.LinuxPlayer) + { + Label($"NOTE: You may need to restart the game after changing to Windowed!"); + } + Label($"Resolution Settings (Current: {Screen.width}x{Screen.height})"); { GUILayout.BeginHorizontal();