Skip to main content
Support
Search our knowledge base

Orientation problem on iOS with GameCenter

Comments

2 comments

  • Harshdeep Singh

    Worked for me using Unity 5.3.3f1. Really thank a lot for this Answer :)

     

    0
  • Stephan van der Feest

    Works for me in Unity 5.3.5f1.

    You can leave out the last 3 lines. They're just like doing 4 + 0 + 0 + 0 (so you can leave out the zeroes and still have the 4 left).

    - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
    {
    return (1 << UIInterfaceOrientationPortrait);
    }

    is enough.

    Be careful of using this as a solution for landscape games not to turn portrait, though: it could end up crashing smaller iPhones when you hold the device in portrait mode and open Game Center. So test that ;)

    0

Please sign in to leave a comment.