When building a simple Unity 5.2.1 project for iOS deployment we set the default orientation to auto rotate and then allow both landscape left and landscape right. When launching the app with Xcode the app will always start in landscape left which means if the player is holding it in landscape right it appears upside down at first and then flips over after a brief moment.
Is anyone else seeing this? We’ve tried it with a brand new project and still get the same results. If both landscape modes are supported (no portrait) it always defaults to just one of them no matter which way it’s being held at launch.
We’re using the most recent version of Unity (5.2.1), the most recent version of Xcode (7.0.1), and are running on OS X El Capitan.
We’ve got even worse bugs - the launch screen image displays correctly to start with and then rotates 90 degrees the wrong way showing the landscape image cut off. There’s a rolling thread on it all here.
Hey, I am also experiencing this issue and have logged a bug report as I was unsure if the previous posters logged one and I couldn’t find any on Issue tracker.
I have found a temporary fix however, disabling “Use Animated AutoRotation” fixes the issue, although you can see the app in the wrong orientation briefly before it correct’s itself. This obviously is not ideal as you do not have the nice animated rotation affect that users would be accustomed to.
Nope, it’s occurring on iPad Air and iPad mini for us, although our testers are saying it’s happening on all iPad devices, but I cannot confirm this. Our app is iPad only, so have not tested on an iPhone.
So since the problem existed in a completely new empty Unity project as well I decided to start going in and debugging Unity’s code from within Xcode. I came across some worrying TODO comments in some of the code. SplashScreen.mm has a “TODO: implement on iPads.” Hmmmmmm… doesn’t sound good right. Then a little further down there’s “FIXME: check on iPad” (currently I’m on Unity 5.2.2f1 and this line is at SplashScreen.mm line 289) I found that if I comment out the FIXME line then the problem of starting upside down goes away. Only problem is that the splash screen is just black at first. Seems like the lesser of two evils though, so that’s what I’ve been doing. Hopefully Unity addresses these TODOs and FIXMEs soon.
Thanks for the information, then they should have really shared this in the release notes as a KNOWN ISSUE.
Did you change this within Xcode once Unity made a build?
@mpaxman Thanks for the find. Commenting this out in our projects seems to have resolved the issue with no side effects. This was for apps with forced landscape, would still need to test in different scenarios.
@MrEsquire I edited SplashScreen.mm directly in xCode.
//_canRotateToLandscapeRight = false; // FIXME: check on iPad
Is this something? The good news is that we dont maybe need to wait for patch and if developers provide hotfix manually edit…
EDIT: I also can confirm that the splash screen is upside down and wrong orientation also.
Upgraded to iOS 9.1 and tested on iPhone 4s and iPhone 6. Initially thought was just iPhone 6 + issue. I’m pretty sure some Xcode needs tweaking.
If the above edits are not applicable for you, have you tried disabling “Use Animated AutoRotation” in the player settings? Not ideal, but if it’s blocking you from releasing, worth the compromise I’d imagine.
Thanks dude for the idea, tried it and made no difference…iPad Mini original one no issue present, iPhone 6, issue is there. So its not restricted to all devices…
@MrEsquire I should have mentioned that we are using Unity 5.2.1p4 w/ xCode 7.0
We also saw after testing yesterday that this fixed this issue on iOS8 iPad3, but it introduced a weird squish/flicker at the start of the splash screen on iOS9 iPad Air2.