Hello , I tried to create a simple splashscreen. at first this waitforseconds working, but suddenly after a few week this code doesn’t want to work. I tried using debug.log but I just get the “before waiting” and the “after waiting” doesn’t appear even after 5 minutes. I am using unity 4.5, why this is happen?
void Start () {
guiTexture.pixelInset = new Rect (0, 0, Screen.width, Screen.height);
StartCoroutine (LoadNextScene ());
}
IEnumerator LoadNextScene(){
Debug.Log ("before wait");
yield return new WaitForSeconds (DelayTime);
Debug.Log ("after wait");
if (NextLevel != "") {
Application .LoadLevel (NextLevel );
}
}