So like others, this rotating black square has bugged me.
Tried to add a view controller and it just caused problems, eventually figured out this solution.
Not sure how much it will effect performance (if at all) but try it out and see if it works well enough for you.
All changes made to AppController.mm
after the EAGLView is added to the UIWindow add the following line
[UIView setAnimationsEnabled:NO];
At the bottom of the Repaint function in AppController.mm add the following code
if ([UIView areAnimationsEnabled])
{
[UIView setAnimationsEnabled:NO];
}
Again, not sure if the conditional is necessary, but there may be some behind the scenes stuff going on in setAnimationsEnabled, so it may be a good idea to keep it.
Also, keep in mind that while I’m pretty sure this code shouldn’t cause any problems just test it out a bit.
I have been desperately seeking to do as your hint suggests and be rid of those horrid black borders once and for all however was unable to get this code to work… I need to allow rotation of the screen for an iPad build and as such need to allow the keyboard to rotate with the device however even after implementing this code as instructed, the dreaded black border when rotating remains…
Were you saying this should work or that you have actually tested it and it works? I put it in the OpenEAGL_UnityCallback where the EAGLview is added as well as the conditional at the end of Repaint however when I rotate I still see those dreaded black edges…
Confirm that the black borders are gone / worked on iPad. I had put the code before the ‘#endif’ in the Repaint function instead of after it causing it to be in-effectual… Many thanks to brad.cordan, petey and JRavey for helping with the solution.
Now if only I could figure out how to get the keyboard based popup components to pay attention the the Screen.orientation
Alas tho, after getting this working, as with all things ‘magical’ there appears to be some negative side effects. Since doing this we have had trouble with the gamecenter ‘slide down’ notification message to remind the player that gamecenter has connected… Sometimes you see it flash for a frame like a glitch other times you dont see it at all. I have also read about other devs having trouble with text entry fields without animations enabled (something to do with the little magnifying glass not working properly)…
Have any of you got GameCenter in their app and is it showing the ‘welcome’ animated slide down prompt ok?