Scene looks later 7 seconds.

Hi! This line is works later 7 seconds all the time. When I selected restart button, scene looks later 7 seconds.

if (GUI.Button(
    new Rect(
             Screen.width/4+10, 
             Screen.height/4+2*Screen.height/10+10, 
             Screen.width/2-20, 
             Screen.height/10), 
             "RESTART")) {
    Application.LoadLevel(Application.loadedLevel); //works 7 sec later
}

How to solve this problem? Thankss.

Few possible reasons off the top of my head:

  • Your scene takes 7 seconds to load.
  • You have a coroutine somewhere that prevents loading next scene for 7 seconds.

Instead of reloading the current scene with Application.LoadLevel(), write you’re own “Reset()” function. Probably won’t find a faster way than this.