Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Rotate Device, black edge rotates?

Discussion in 'iOS and tvOS' started by spentak, Sep 29, 2010.

  1. spentak

    spentak

    Joined:
    Feb 11, 2010
    Posts:
    246
    When my game is on the device, and then I turn the device, I see the 4 black "corners" rotating. How do I stop that from showing?
     
  2. jonaphin

    jonaphin

    Joined:
    Dec 31, 2008
    Posts:
    209
  3. spentak

    spentak

    Joined:
    Feb 11, 2010
    Posts:
    246
    I put those exact values in the Start() method of persistent gameobject/script and i still get the black edge rotation. Any thoughts?
     
  4. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    Why is the last one true?
     
  5. JamesMobot

    JamesMobot

    Joined:
    Jul 8, 2010
    Posts:
    170

    Kind of funny that the link goes to a post that doesn't really ever resolve the issue for the guy originally asking the question.
    I have also noticed this same question keeps coming up and every thread ends with it almost being answered but never quite 100%

    Seems like at some point someone is bound to just come right out and say "do this, and put it here"
     
  6. JamesMobot

    JamesMobot

    Joined:
    Jul 8, 2010
    Posts:
    170
    Oops..

    Realized that last post may have sounded a little rude since i didnt actually answer it.

    The only reason I didn't is because what works for me may not be the best solution or even the correct one.

    I just use the following and it seems to work:

    Code (csharp):
    1.  
    2. function Awake (){
    3.     iPhoneKeyboard.autorotateToPortrait = false;
    4. iPhoneKeyboard.autorotateToPortraitUpsideDown = false;
    5. iPhoneKeyboard.autorotateToLandscapeRight = false;
    6. iPhoneKeyboard.autorotateToLandscapeLeft = false;
    7. }
    8.  
    Use Awake not start

    All are set to false but if you need the keyboard (for example Game center) you would want to set it true for your orientation.

    Again this is just what i have done that seems to work.