protected IEnumerator OnPostRender() { if (unit.Recording && Time.frameCount % m_CaptureEveryNthFrame == 0) { yield return(new WaitForEndOfFrame()); unit.RecordImage(Time.unscaledTime); } }
private void OnEndOfFrame() { if (unit.Recording) { if (frameCounter == 0) { unit.RecordImage(Time.unscaledTime); } frameCounter = (frameCounter + 1) % FrameInterval; } }