Hi,
I have come across a really irritating bug and I can’t seem to find the cause or a good work around. My app is in landscape mode (landscape mode only in fact) but on iOS7 the unity camera seems to think it’s in portrait mode. On an iOS 8 device the same code works perfectly. I am using Unity 5 (not sure if the bug was apparent in 4, only started testing with the ios7 device after upgrade )
On iOS 7 iPad 3 (wrong):
_camera.aspect.ToString() = 0.75
_camera.pixelWidth.ToString() = 1536
On iOS 8 iPad Air (correct ):
_camera.aspect.ToString() = 1.333333
_camera.pixelWidth.ToString() = 2048
UPDATE:
This bug only occurs when I am using the camera in the start function of my UI generation class - if I query the same camera a few frames later it has the correct values. Is it possible the camera hasn’t been properly initialised by this point? Is there a way to check/force this?
This bug is obviously screwing up the positioning of all my UI in a big way, so I need to find a solution or a betterworkaround asap.
Thanks in advance for any help.