- Home /
Player Screen Resolution
Is there a way you can enforce a specific resolution on the player? Ex. Force 800 x 600 and above
Answer by g0tNoodles · Jul 29, 2012 at 11:10 AM
You can put a specific resolution into the player settings so that they HAVE to use that one or you can choose from a range of resolutions in the player settings too. You could also code a (set of) resolution(s) to let the player choose.
but what if you have multiple scenes? do you just apply the code in each one?
As far as I know, no. it woildn't make sense to have to set the resolution on each scene. If you really want you can set an obect that is called/instantiated every scene that holds a script to set the res...that is if it doesn't set the game to the desired res as a whole. You could always make a test project and try it out =]
Answer by AlucardJay · Jul 29, 2012 at 10:32 AM
Find what the available resolutions are with this : http://docs.unity3d.com/Documentation/ScriptReference/Screen-resolutions.html
Set the resolution with : http://docs.unity3d.com/Documentation/ScriptReference/Screen.SetResolution.html
More screen variables : http://docs.unity3d.com/Documentation/ScriptReference/Screen.html
but what if you have multiple scenes? do you just apply the code in each one?
Like on the other answer, once you start your game it would be safe to assume that the resolution will stay the same for the whole game. I cannot think of any reason to swap resolutions during a game. And if as in your question you are forcing a resolution, then that's what the resolution will be until you change it, therefore no reason to force the resolution for every scene. Once it is set, it is set.