Render extra frames in the middle of a frame.

Hello,

I’m trying to show a loading animation when I’m loading a new scene. Now there are already a lot of tutorials on how to do this by loading the scene asynchronous, that’s not the problem for me however. The problem is that I’m running some intensive code at the start of the level. I tried using camera.Render() to render extra frames during the execution of this code but that doesn’t seem to work. Am I missing something? Is there even a way of rendering extra frames in the middle of a frame?

No, there’s no way to do that. The buffers are swapped at the end of the frame. Actually you can’t really draw during Update as the rendering phase hasn’t yet been started.

Your only option is: let the frame finish. You can do that by using a coroutine for your heavy calculations and use some yield return null; in between to let Unity complete a frame and actually update the screen.