title: unity5 iOS gamecenter login popup changing game orientation to portrait
body: <p>I am working on a unity2d game which runs in landscape mode, targeting iOS devices. 
  After integrating game center plugin for iOS, and while running in device, I accidentally kept the device in portrait mode. Game center login splash popped out as expected and after login, entire game orientation changed to portrait mode.</p>
  
  <pre><code>Social.localUser.Authenticate(OnAuth);
  </code></pre>
  
  <p>I then tried placing this function in UnityApp...Controller.m file</p>
  
  <pre><code>- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
  {
   return UIInterfaceOrientationMaskLandscape | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
  }
  </code></pre>
  
  <blockquote>
    <p>After making this change, app started crashing once game center attempts to login, keeping the device in portrait mode</p>
  </blockquote>
  
  <p>Any workaround or fix available for this ?</p>
  
  <p>UPDATE 1:
   I tried to disable game center when app runs keeping the device in portrait mode using the below code. </p>
  
  <pre><code>if( Input.deviceOrientation == DeviceOrientation.LandscapeLeft || Input.deviceOrientation == DeviceOrientation.LandscapeRight ) {
     Social.localUser.Authenticate(OnAuth);
  }
  </code></pre>
  
  <p>Regardless of the device orientation, "if" condition always succeeded and showing the game center... and turns my game to portrait again:(</p>