- Home /
Can't change resolution, Screen.SetResolution not working
Hi everyone!
I know this has been discussed a lot of times before, but none of the suggested solutions are working for me. I'm at the final stages before releasing my game, but this issue is blocking me. I'm using this code at my GameController script's Awake function, but it doesn't help:
PlayerPrefs.DeleteAll ();
Screen.SetResolution (1280, 720, true);
No matter what, my game will start at that resolution, which is the current one. If my monitor's current setting is 1024x768, the game will start at 1024x768. If I'm using 1280x1024, then the game will use that too. And so on..
Any ideas are welcome, because it gets me frustrated for quite a long time now. Thanks!
Answer by AconitumNapellum · Dec 02, 2019 at 10:54 AM
Does your game start windowed? Because I don't think you can force your screen to a different resolution than its native. Try selecting "Windowed" in Fullscreen mode setting in Player Settings.
Answer by gsm84 · Dec 02, 2019 at 11:18 AM
1280x720 is native too. And when I set it manually in the monitor's settings, the game starts at 1280x720. But I'd like to give an option to the players to be able to change the resolution in the game, but this way it's not possible. By the way, when I'm trying the above code with a false setting, it's still not working properly. When the monitor's setting is 1024x768, the game will run in windowed mode, but only in 1024x720, instead of 1280x720.
Your answer
Follow this Question
Related Questions
How to make game mode show retina display 0 Answers
Set Hightmap resolution while importing custom heightmap texture? 1 Answer
How to configure my Android Game to work on different screen resolutions? 1 Answer
Pick sensible resolution for FullScreen Mac App 2 Answers
Stretch Worldspace to Screen Resolution 4 Answers