IEnumerator RunInference() { float currDeltaTime = 0; while (runInference) { currDeltaTime += Time.deltaTime; if (currDeltaTime > targetDeltaTime) { currDeltaTime = 0; ApiCoordinator.Predict(CameraCapture.CaptureScreenshot()); } yield return(null); } }