- Home /
iPhone 4 and 5 resolution
hi, as i know iPhone 4 screen resolution (640 x 960) and iPhone 5 screen resolution (640 x 1136). i made my project on (640 x 1136) that i can change my resolution for iPhone 4 using this code : Screen.SetResolution (640, 960, true); and a condition iphone.generation
i test it on my iphone 4 and it doesn't work. any suggestion.
Thank you
Post the script to your question, also is it a iPhone 4 or 4s? and when you said it doesn't work, does that mean what exactly, what resolution did you end up with? Does it default out?
Answer by grendayzer77 · May 09, 2014 at 02:28 PM
function Start ()
{
Screen.SetResolution (640, 960, true);
}
It works but i had to resize the camera. this is the code i used. Hope it can help others.
function Start()
{
if (Screen.height == 960)
{
Screen.SetResolution (640, 960, true, 60);
camera.orthographic = true;
camera.orthographicSize = 4.78; // it depends of camera seize
}
else if (Screen.height == 1136)
{
Screen.SetResolution (640, 1136, true, 60);
camera.orthographic = true;
camera.orthographicSize = 5.68; // it depends of camera seize
}
}
Your answer
Follow this Question
Related Questions
iPhone5 resolution 0 Answers
iphone4s app width is not adjust in iphone5 0 Answers
working with retina display, new game 1 Answer
Game View Resolution Different from iPhone5 Device Resolution 0 Answers
Change Screen Resolution 1 Answer