Possible bug with Screen dimensions on startup

Hi All.

I’ve got a problem with my games on iPad3, on the start function of any scene, if I print out Screen.width and height and orientation it gives me W= 1536 H = 2048 Portrait, BUT this is when the device is sat in landscape mode!!
When the 1st update frame is called it is now read correctly as 2048 x 1536 landscape.

I calculate a load of stuff based on these numbers at startup and they are used in my gui etc all mess up. I didn’t want to do the maths in update so I do it all in Start.

Any ideas what is going on?

Try yielding until the end of frame maybe? I’ve found a few instance where things aren’t properly initialised in start, and yield till end of frame, and sometimes use two yields to skip another frame.

Yes, the workaround I have is to monitor screen.orientation during update and when it changes call my function that I used to have at the start. Doing this I’ve notice some strange unity behaviour. At least 2 or 3 frames go by before it gets it right.

Found it, I had a plugin that was manually messing with screen orientations.