Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Game Center Login & Leaderboard use Device's Orientation IGNORE Unity's Settings or Untiy Code.

Discussion in 'iOS and tvOS' started by zastrow, Dec 30, 2015.

  1. zastrow

    zastrow

    Joined:
    May 23, 2012
    Posts:
    20
    Unity 5.3
    using UnityEngine.SocialPlatforms;

    Social.localUser.Authenticate(ProcessAuthentication);

    If you're device is logged into Game Center, the welcome screen pops up in the same orientation as your project settings.

    But if you are not logged in to Game Center, the Login Screen pops up in whatever orientation the device happens to be in, and it actually resets your project to that orientation!

    I have found little on this, I'm surprised this is not a bigger issue for developers.

    To fix this, I know I'll need to modify some code in Xcode. Has anyone had experience with this?
     
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think maybe your first one to find these issues because I never really understood or found good documentation on Unity Social Platforms and there own code for these. I always used plugins such as Prime31 which are updated soon as Apple or Android make changes etc. I wonder when the last time there update for Game Center code for Unity.
    There is no mention of upgrades in release notes for some time, unless a bug is found I guess.

    Or Im missing the point here and totally confused?
     
  3. zastrow

    zastrow

    Joined:
    May 23, 2012
    Posts:
    20
    I think you might be right. I submitted a bug report with a sample project folder.
     
  4. TaintedNobodies

    TaintedNobodies

    Joined:
    Feb 21, 2010
    Posts:
    76
    I've had the same issue since using unity 5.2 I believe. I have game locked in portrait and once the Game Center opens in app if it is at all rotated it rotates the game to unwanted orientation and since my setting has locked orientation it doesn't go back. In the Xcode project I know unity has its own oreientation file to control on top of the default orientation control that is there. I have tried modifying code and tryin to get rid of orientation changing code but no fix. Has any comment been made from unity or someone find a fix?