Unity iPhone : black rect when I turn the iPhone


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.



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.