Hello everyone I have a small problem.
I have an empty scene where just main camera what should play one sound and then load in to the next scene, I made a Coroutine but something just got wrong. Does anyone have idea where I made a mistake?
Here is a script what attached to the camera.
public class RelayScriptGo : MonoBehaviour {
public Camera MainCam;
public AudioSource source;
public AudioClip clip;
void Start ()
{
source = GetComponent<AudioSource>();
MainCam = GetComponent<Camera>();
LoadFirstChapter();
}
public IEnumerator LoadFirstChapter()
{
source.PlayOneShot(clip);
yield return new WaitForSeconds(3);
Application.LoadLevel("chapter1sceen");
Debug.Log("working");
}
}