Problem with orientation on iOS8

I am developing portrait game for iOS (in player settings only portrait selected). In that game, I have mini game that is in landscape mode. I change the orientation in Unity using Screen.orientation=ScreenOrientation.Landscape;
When I’m in that mini game and go to home screen using home button, when I return to the game, orientation changes to Portrait Upside Down. I’m using Unity 4.5.4f1 but I also tried on 4.5.4p2.

Before going to home screen:
[33153-screen+shot+2014-10-01+at+8.25.09+am.png|33153]

When returning to game:
[33155-screen+shot+2014-10-01+at+8.25.25+am.png|33155]

This problem first appeared when iOS8 came out and I installed xCode 6. The game worked when building with older xCode. Problem appears only on devices that have iOS8 on them(tested on iPad Gen4 with 8.0.2 and iPod Touch Gen5 with 8.0).

Any suggestions?

I was facing the same issue. http://stackoverflow.com/questions/26072008/landscape-orientation-issue-with-ios-8-in-unity?noredirect=1#comment40888317_26072008

I saw your post on stackoverflow but I thought that you only have problem on startup whitch is fixed in unity 4.5.4 I think.

No . i dnt have prblm on start up. i used xcode 5 and build game in to that, so it solved my orientation problem

I returned to xCode 5.1.1. I hope they will fix this issue soon because from this xCode I cant test directly on devices runing iOS8 and Ad-Hoc exporting of IPA file takes a lot of time. Anyway, thanks for your help.

Hmm. Its ok. :)

1 Answer

1

I returned to xCode 5.1.1. I hope they will fix this issue soon because from this xCode I cant test directly on devices runing iOS8 and Ad-Hoc exporting of IPA file takes a lot of time. Anyway, thanks for your help.

We need a bug report to fix the issue. Please submit one following these guidelines: