I am using Inity iPhone Advanced in combination with UIKit. When I start my game up the first time, and switch from UIKit views to the Unity engine, for a second or so I can see graphics from a previous game (Bejeweled 2 for example, whatever I had open before my own game) before Unity kicks in.
How do I get this blanked out so that it’s just a black screen until Unity starts rendering?
I have been told something about clearing an OpenGL context but I have no idea where to begin.
Unity iPhone devs, please help!
Admittedly I’m not using the UIKit and then instigating the Unity Engine, but I had similar symptoms when I started the app without any scene cameras enabled (i.e. those with culling masks that let them see ‘everything’ or at least the ‘default’ layer)
In my case it was “cured” by rotating the main camera 90 degrees so it’s looking at nothing rather than turning it off altogether - but I guess there’s a bunch of different approaches here (including an empty ‘loader’ scene etc).
Hopefully something along those lines will help…
I could be wrong, but I think this:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
should do the trick.