Application.LoadScene

In VS 2015 there is a warning in the intellisense that this is deprecated and I should use SceneManager.LoadLevel. However when I use that I get script errors (and intellisense doesn’t recognize it) and I go back to Application.LoadLevel, which does work. What gives?

You need to add

using UnityEngine.SceneManagement;

However, Application.LoadLevel still works fine. It’s just a suggestion, but you can use Application.LoadLevel with no issues.

1 Like

thanks Droid!

SceneManager.LoadScene requires you to add the proper using statement. If you type it in, then right click on it, select the lightbulb and choose to add the using statement, you can add it from a list of choices to resolve the error. You can add it manually as well, but this is just as easy.

2 Likes

Thanks for the light bulb tip, I didn’t know that.