i Want to change level on keypress and after X seconds
I dont know why " yield WaitForSeconds " do not work
Here’s my script
using UnityEngine;
using System.Collections;
public class Cambiar_nivel : MonoBehaviour
{
void Update()
{
//Load a scene by the name "SceneName" if you press the W key.
if (Input.GetKeyDown(KeyCode.W))
{
yield WaitForSeconds (5);
Application.LoadLevel("2");
}
}
}