When I run my game in the editor and change the resolution using the editor dropdown, everything works fine
(1280x800)
(720x450)
The window also resizes correctly when I build my game and exit fullscreen.
However, when I switch to fullscreen from ingame, the UI does not scale with the screen size unless I set the resolution to the native resolution. (not allowed any more pictures, sorry about link.)
Part of fullscreen/resolution change script:
void ChangeSettings () {
//...
StartCoroutine (Fullscreen (isFullscreen)); //isFullscreen = Player Pref
//...
}
private IEnumerator Fullscreen (bool fullscreen) {
int width = Mathf.FloorToInt (resolution.x); //Player pref resolution
int height = Mathf.FloorToInt (resolution.y);
Screen.fullScreen = fullscreen;
yield return new WaitForEndOfFrame ();
yield return new WaitForEndOfFrame ();
Screen.SetResolution (width, height, Screen.fullScreen);
}