- Home /
Question by
gamingunchanged · May 10, 2014 at 10:00 PM ·
javascriptresolutionfixed
Pause Menu Screen Resolution
I am currently working on a new pause menu, it's all going well, but I'm having problems with the screen resolution changing. In my old pause menu there were set screen resolutions to choose from, but I want to have it so that it's proportional to the user's monitor, so that the quality won't be weird for them. This is an example of one of the screen resolution options on my old pause menu:
if (GUI.Button(Rect(Screen.width / 2 - 220, 50, 200, 40), "640 x 400"))
{
//if the player clicks on '640 x 400'
//It'll be the same with all the other resolutions, just with different values for the resolutions
if (windowed == true)
{
//If the windowed variable is true, so if the game is windowed
//Set the screen resolution to 640 x 400, and the false part means that fullscreen is false
Screen.SetResolution(600, 400, false);
}
else
{
//otherwise, so if the windowed variable is false and the fullscreen variable is true
//Set the screen resolution to 640 x 400, and the part that says true means that fullscreen is true
Screen.SetResolution(600, 400, true);
}
}
I want it to be kind of like unity's pre-game options menu where the screen resolutions that appear depend on the actual monitor of the user. Thanks in advance.
Comment