I’ve been logging Screen.width and Screen.height on different iOS devices, and the iPhone 4S seems to be the only one that doesn’t update its reported values for a change in screen orientation.
I am setting the orientation to ‘Landscape Left’ from Unity and ensuring that setting is correct in Xcode. Once built, an iPad2 reports a screen.width of 1024 (due to being in landscape orientation) but an iPhone 4S still reports a width of 640 (the width of the device if in portrait orientation).
Is there a particular build setting that is causing an issue? The game does indeed display in landscape orientation, but the reported width and height are that of a portrait orientation.
EDIT: I decided to set the orientation to landscape left manually in my Start() function before checking the Screen size:
Screen.orientation = ScreenOrientation.LandscapeLeft;
Debug.Log ("set orientation manually: " + Screen.orientation);
Debug.Log ("Screen.width: " + Screen.width + " Screen height: " + Screen.height);
The orientation prints out as “Portrait” even though the game is in landscape view. I still also get a reported 640x960 screen size, instead of the expected 960x640 landscape screen.