Is there an alternative to WaitForEndOfFrame without coroutines?


I need to run some code after all of the rendering code has run, including post processing and GUI.

This can be easily achieved by using using the WaitForEndOfFrame yield instruction. However, I need to avoid using yield statements, since Mono’s pdb2mdb crashes whenever it finds a yield. (
I need to use pdb2mdb because I am compiling my code into a dll with VS and need to convert the symbols file into a format that MonoDevelop understands, for debugging purposes.

So, is there a way to run my code after all of the rendering code has run, without using coroutines?

The Unity documentation (Unity - Manual: Order of execution for event functions) states the order in which the rendering callback are called, but there doesn’t seem to be anything equivalent to the WaitForEndOfFrame yield instruction.

Many thanks,

Answering myself:

This other post mentions another version of pdb2mdb that can deal with yield statements, so I’ll be able to use coroutines in the end.