- Home /
Question by
user-3467 (google) · Jul 07, 2010 at 02:30 PM ·
iphonerectblack
Unity iPhone : black rect when I turn the iPhone
Hello,
I'm programming with Unity Iphone and when I build my application, it works fine but every time I turn the device, I see a black rect that turn so. Is it possible to make it invisible. I tried to specify the iPhone orientation but that changed nothing.
Thanks
Marc
Comment
Best Answer
Answer by defmech · Jul 07, 2010 at 02:47 PM
The black you're seeing is the keyboard mask rotating. Locking your orientation isn't enough to prevent that from occurring, you need to specifically lock down the keyboard itself.
iPhoneKeyboard.autorotateToPortrait = false;
iPhoneKeyboard.autorotateToPortraitUpsideDown = false;
iPhoneKeyboard.autorotateToLandscapeRight = false;
iPhoneKeyboard.autorotateToLandscapeLeft = false;
Put that in the Start() function in one of your scripts and it will keep the mask from rotating.