I want to take a sequence of screenshots that I render to a texture. Between every shot I want to rotate the mesh I'm "photographing".
To do this I've created a monobehaviour that I attached to the main camera. In Start() I set up the mesh and the object and call a coroutine like so:
And the function that is supposed to do all the work:
Note: this is not the complete code, I have a working GrabScreenshot() function, and I get a texture out to a file, just like I intend.
But: Only the first screenshot in the sequence is complete. The rest appear to be taken during rendering and not at the end of the frame. Why doesn't the coroutine properly yield for the end of the frame more than once? What am I doing wrong?
asked Dec 11 '10 at 04:22 PM
I just answered a similar question over here... http://answers.unity3d.com/questions/201049/image-inventory.html
I posted my script for taking screenshots in sequence and showing the latest one on a GUI texture. It waits until the Frame is rendered and then saves it outside the assets folder so you can use it different ways. ;)
answered Feb 28 '12 at 11:24 PM