Unity 5 translation

What is the unity 5 equivalent of:
Application.LoadLevel(Application.loadedLevel + 1);

i have this so far
SceneManager.LoadScene(SceneManager.sceneLoaded + 1);
but the sceneLoaded is incorrect

1 Like

Make sure that you have this at the top:

Then it’s:

public void LoadNextLevel()
{
    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex+1);
}

And make sure your scenes are also in the build settings.
I also followed the course with unity 5 from the start and normally you can find the solution to what code is different in the QA section of the lecture :slight_smile:

3 Likes

Privacy & Terms