- Home /
Set Screen Resolution.
Hello, i am working on a game and i want the game to work on all apple devices and i have no idea how i can set the screen resolution for all the devices. I googled and found if(screen.height == 960 && screen.width==1136){//do something}. but no idea where to apply this code. HELP
put in Start() function.
I'm answering like that because your question is as vague as this.
Answer by abi-kr01 · Nov 20, 2013 at 01:32 PM
if u r using c# then it should be placed inside on void Awake() else function awake() because it the first thing that will be called when ur app starts.
if(screen.height == 960 && screen.width==1136)
{
//do something
here u have to calculate the screen width by height and adjust ur
whole game object according to that ratio.if u fix the size say 960*1136 and
ur game run on device with screen size 960*460 then there may be some problem
}
i can't say whatever i wrote is fully correct but u can use the concept.
just so you know, to comment out a block of code, you do
/*
something
like
this
*/
Your answer
Follow this Question
Related Questions
Asset Variations for Different Mobile Screen Sizes 1 Answer
Max Resolution? Targeting 4320x5400 px... 1 Answer
Auto scaling GUI 3 Answers
2D Game. Screen, Camera and coordinates. 0 Answers