fernio
1
In an Android game I’m currently working on, we’re calling Application.Quit() when the user presses the back button on the main menu. The problem we’re having is that the screen flickers for a second before the game closes, flipping between the current and previous frames. How can we avoid this flicker when calling Application.Quit()?
Bunny83
2
Well, you could do something like this:
When you want to close your app, start a coroutine which does this:
- Disable all camera(s)
- yield WaitForEndOfFrame
- GL.Clear(true, true, Color.black, 1.0f);
- yield WaitForEndOfFrame
- GL.Clear(true, true, Color.black, 1.0f);
- Application.Quit();
Exalia
3
I fade my screen to black similar to what Bunny83 said but instead I create a 2D texture, set its Rect to the Screen.width and Screen.height, set it’s color to black and it’s alpha to 0.0f then Lerp it to 1.0f over 2/3 seconds. once the alpha channel is 1.0f I do Application.Quit();
There are some great scripts out there that do this 