Unity 5.3 How to load current level

Hello, before Unity 5.3, I could do


But now it’s something weird with SceneManager. I’ve read documentation but nothing. How do I get the current scene and load it (Unity 5.3f4)?


someone in the #unity3d irc chat helped me figure out it is this:


GetActiveScene() returns the current scene object then you can use .name or .buildindexin LoadScene()

*Edit: Addition from Double_D you need:

 using UnityEngine.SceneManagement;

Here’s an example script of mine: Khomaniac/Assets/_Scripts/FallDeathRestarter.cs at master · 9-zzz/Khomaniac · GitHub

If “using UnityEngine.SceneManagement;” does not work for you in javascript try:

import UnityEngine.SceneManagement;

That worked for me.

This works 100%!

   public void Reload()
        int scene = SceneManager.GetActiveScene().buildIndex;
        SceneManager.LoadScene(scene, LoadSceneMode.Single);
        Time.timeScale = 1;

Don´t forget to add " using UnityEngine.SceneManagement; "