- Home /
Multiple screenshots of the same frame
Hi,
I'm trying to take multiple screenshots of the same frame. Once a key is pressed, the script will run and capture the screens.
So the first screenshot contained all of the gameobjects. The second screenshot captured the screen while disabled gameobjects with tag A. the third one disable another one, and so on.
Basically I want to write a script such that to mimic the action of pausing the game by pressing the pause button in the main bar, take screenshot, disable a gameobject, take another screenshot, and repeat, while maintaining the same frame.
Is there anyway to achieve this?
Answer by hoogemast · Jul 21, 2016 at 09:48 AM
As far as I know your calls to functions will hold the program in the same frame until finished. It would be strange if you change a position of a gameobject onClick() and it changes it's current position while reading it. So if you call a function onButtonPressed() you can get all the camera images. If you disable the gameobjects before rendering the screenshot i think they won't appear. I have not tested this though so I'm not sure. I hope this will bring you in the right direction.
The screenshot capture itself is explained in the following link.
Your answer
Follow this Question
Related Questions
Application.CaptureScreenshot on a Texture2D? 1 Answer
Application.CaptureScreenshot() renders black pngs. 0 Answers
Capturing 360 Image causes to darken the image and show ghosting and artifacts 0 Answers
Does anyone else gets bad results with "superSize" in Application.CaptureScreenshot()? 0 Answers
Application.CaptureScreenshot supersizing doesn't work for Canvas? 1 Answer