private IEnumerator Play() { if (project.getAllAudio() != null) { if (project.getAllAudio().Count >= 1 && project.checkAudioCompletion()) { for (int a = 0; a < MicrophoneManager.getAllSources().Count; a++) { MicrophoneManager.getAllSources()[a].Stop(); MicrophoneManager.getAllSources()[a].Play(); } } } for (int i = 1; i <= project.getAllFrames().Count; i++) { DisableAll(); EnableActive(i); currentFrame = i; if (isPlaying) { yield return(new WaitForSeconds(spf)); } else { break; } } if (isPlaying) { if (MicrophoneManager.currentlyRecording) { isPlaying = false; LoadPage(1); yield break; } else { StartPlay(); } } else { if (project.getAllAudio() != null) { for (int a = 0; a < MicrophoneManager.getAllSources().Count; a++) { MicrophoneManager.getAllSources()[a].Stop(); } } LoadPage(1); yield break; } }