Hello, I’m using the ScreenCapture.CaptureScreenshotAsTexture() function to take screencapture. I’m using this coroutine (the one from the documentation)
IEnumerator RecordFrame()
{
yield return new WaitForEndOfFrame();
var texture = ScreenCapture.CaptureScreenshotAsTexture();
// do something with texture
// cleanup
Object.Destroy(texture);
}
public void LateUpdate()
{
StartCoroutine(RecordFrame());
}
The thing is that LateUpdate is too often for me, I need something “slower”. I don’t know if making a coroutine inside a coroutine is a good thing, but nonetheless I tried and it seems to fire more than once each 3 seconds anyway. Any idea how to get a screenshot each 3 seconds?
IMPORTANT! Using a second camera and rendering it to a texture IS NOT AN OPTION!