- Home /
ShowAchievementsUI screen rotation
Hi,
When I call Social.ShowAchievementsUI() to get my GameCenter achievements, the screen flips to another rotation, and the GameCenter window always comes out the opposite side.
XCode gives me the following:
The view controller returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
My game uses autorotate, and can rotate to all 4 rotations. I've found that when I restrict this to one rotation, it forces GameCenter and Unity to behave, but I still get the error in XCode.
Any ideas would be appreciated! :)
Answer by chavez98 · May 08, 2012 at 03:45 AM
I'm having the same issue. Have you figured out a solution for it?
Answer by Stumpy · May 08, 2012 at 10:32 AM
I did, but there isn't really a solution I've found that I liked.
In Unity iOS player settings, if you set the autorotate method to Unity's method of rotating without a transition (which we did because of the stretching Apple's method had), then in Obj-C it overrided the default autorotate. Works great for everything unity does, but when using Gamecenter or anything built solely in xcode that asks for screen orientation, it returns something along the lines of "Don't know what the rotation is, thought you were handling that".
Hours of trying stuff layer, I came up with the only solutions:
1) Implement your own UI ( Something we're doing in our next game ). 2) Use apples autorotation 3) If using unity autorotation, you could try locking autorotation to your current rotation only before accessing gamecenter, although we could never find a way to unlock it after closing the gamecenter window. 4) Stick to just portrait or just landscape (what we had to do in our last game), and use apples autorotation since it only stretches when changing aspect ratio.
Hope this helped!
Your answer
Follow this Question
Related Questions
UI render doesn't sync with Camera movement 2 Answers
Cannot report achievement completion after ResetAllAchievements 1 Answer
drag a UI panel keeping it with the screen bounds 2 Answers
How do I face a WorldSpace HealthBar towards multiple cameras? 2 Answers
Change position and scale of objects according to mobile screen size 0 Answers