Hello. I am Very new to Unity and trying to accomplish my first project - book in VR. I can pause narration, resume it. The problem is how to load automatically next scene, when narration of the first chapter ends?
Is it smth like:
using UnityEngine;
using System.Collections;
public class LoadNextLevelWhenNarrationEnds : MonoBehaviour {
public Texture SceneTwo;
public AudioClip narration;
IEnumerator playNarrationThenLoad(){
audio.Play ();
yield return new WaitForSeconds(audio.clip.length);
Application.LoadLevel(“Scene2”);
StartCoroutine(playNarrationThenLoad);
}
}
And to what i have to attach the script? I guess to the main camera is the most appropriate.
Thank you for any help