private IEnumerator Tests() { yield return(null); PhotoCaptureComponent photoCaptureComponent = gameObject.AddComponent <PhotoCaptureComponent>(); Debug.Log("(MAIN) Starting tests in 5s"); yield return(new WaitForSeconds(5)); int testN = 0; while (true) { testN++; Debug.Log("(MAIN) Starting test capture: " + testN); photoCaptureComponent.TakePhoto(); while (photoCaptureComponent.IsTakingPicture) { yield return(null); } Debug.Log("(MAIN) Finished test capture: " + testN); Debug.Log("(MAIN) Waiting 2 seconds before the next..."); yield return(new WaitForSeconds(2)); } }
private IEnumerator Tests() { yield return(null); PhotoCaptureComponent photoCaptureComponent = gameObject.AddComponent <PhotoCaptureComponent>(); photoCaptureComponent.PhotoResultMethodHandler = PhotoResultMethod; photoCaptureComponent.CreatePhotoCapture(); }