IEnumerator CaptureAll() { int i = 0; Camera cam = Camera.main; while (i < snapshotAmount) { Transform tr = PointCloudCoordinator.NextPoint(); cam.transform.position = tr.position; cam.transform.rotation = tr.rotation; CameraCapture.Capture(); i++; yield return(null); } }
public void OnGenerateClick() { PointCloudCoordinator.RegeneratePointCloud(snapshotAmount); StartCoroutine(CaptureAll()); }