Load Scene by audio clip

Could someone easily tell me how to load a scene after an audio clip have been played?

Something like:

if (Audiosource.play) Application.LoadLevel(0);

or something, I know what I wrote there won’t work but could anyone easily tell me how to make it work?

thx!

You can do something like…

var myClip : AudioClip;

myClip.Play();

if (!myClip.isPlaying)
{
     LoadYourScene();
}

You might want to use a Co-Routine rather to be safe.

I believe there is a couple way to solve this issue. However, I know only one. :slight_smile:
First, when the audio is played, make another function, then add yield WaitForSeconds(). Duration of waiting depend on the length of your audio. Then use Application.LoadLevel (); Hope this help. ^^