I am trying the following:
void OnTriggerEnter() {
audio.PlayOneShot();
Stopwatch stopwatch = Stopwatch.StartNew();
renderer.material.color = Color.blue;
while (true) {
if (stopwatch.ElapsedMilliseconds >= 3000) {
break;
}
Thread.Sleep(10);
}
Application.LoadLevel("AverageLoading");
}
This is what I tried but it just goes straight to the AverageLoading level without
playing any audio. Can someone give me advice with this?