Loading current scene in Unity 5.5
from: http://answers.unity3d.com/questions/1109497/unity-53-how-to-load-current-level.html
In “Unity 5.x By Example”, I met Application.LoadLevel (Application.loadedLevel) but it is obsolete according to the documentation and proposed to use SceneManager. Here is how to use SceneManager to load currently active scene (level).
using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public class Timer : MonoBehaviour { void Update () { CountDown-= Time.deltaTime; if (CountDown <= 0) SceneManager.LoadScene (SceneManager.GetActiveScene ().name); } }
GetActiveScene() returns the current scene object and then you can use .name or .buildindex in LoadScene() .