GUI not scaling correctly on in-game resolution change (Zooming)

Hello Everyone,

I have created resolution options in game and when i change the resolution from 1920 x 1080 to 1366 x 768 or 800 x 600 the menu’s just zoom in.

If i were to launch the game in the random resolutions like 800 x 600 the menu will display correctly and scale accordingly.

My question is how do i manually refresh the menu’s once another resolution is chosen.

Images Here: -

Normal Before Changing Resolution:

When Clicking a Resolution to change too: -

If i launch game in selected Resolution using launcher: -

My code for the Resolution buttons: -

if(_isDisplaySubOptionsMenu == true)
        {
            GUI.Label(new Rect(5, 90, 400, 25), "Displays Are Under Testing Stage And May Not Work Correctly!");

            if (GUI.Button(new Rect(5, 120, _optionsMenuWindowRect.width - 42, 32), "1280 x 720 @ 60Hz", "Button"))
            {
                Screen.SetResolution(1280, 720, true, 60);
               
            }

            if (GUI.Button(new Rect(5, 157, _optionsMenuWindowRect.width - 42, 32), "1366 x 768 @ 60Hz", "Button"))
            {
                Screen.SetResolution(1366, 768, true, 60);
               
            }

            if (GUI.Button(new Rect(5, 194, _optionsMenuWindowRect.width - 42, 32), "1600 x 900 @ 60Hz", "Button"))
            {
                Screen.SetResolution(1600, 900, true, 60);
               
            }

            if (GUI.Button(new Rect(5, 231, _optionsMenuWindowRect.width - 42, 32), "1920 x 1080 @ 60Hz", "Button"))
            {
                Screen.SetResolution(1920, 1080, true, 60);
               
            }
        }

All windows use unique const int id’s.

if you need to know more please ask and i can provide.

Anyone able to help?

Many thanks.

Tea Junkie

Is the canvas set to scale with screen size? If not, maybe try setting it to that to see if that works.

I’m using just basic camera and attached script to camera to render the menu’s.

I thought Canvas was for the new Unity UI system?