Hi all,
As the title says, I’m having a problem with using Screen.SetResolution(…).
When in fullscreen mode, and calling Screen.SetResolution(1024, 768, false), the game will exit fullscreen mode but the resolution will not be applied and appears to revert to 640x480 (more on that below…). If you then change the resolution again while in the windowed mode, the resolution will change to the appropriate windowed resolution.
I’m disabling the ‘Display Resolution Dialog’ in the player settings, so that all the resolution settings are handled inside the game.
I have noticed that when I enable the dialog to test, it defaults to 640x480… In-game, the resolution gets set to whatever the current desktop resolution is if it can’t find a custom saved resolution setting. So if you were to specify 1280x720 in the unity dialogue (for testing purposes) then the game would still default to the current desktop resolution, but if you toggle to windowed mode, it will revert to 1280x720, not the specified resolution.
This is on OSX. I know OSX handles fullscreen differently to windows so I’m not sure if that’s playing a part here.
TL/DR: Resolution changes are not being applied when going from fullscreen to windowed mode.
Thanks for your time,
Sam