import SceneMangement not working?


- switched from Application.LoadLevel to SceneManager.LoadScene because Unity said it was obsolete.

- Added using UnityEngine.SceneManagment;

- Changed using to import.

- Placed the code in different spots since I am unsure where this line is actually supposed to go.

Here's a picture of what I currently have (keep in mind, while it says using I did try import already). The blue lines indicate the other places that I tried placing the code with no luck. ![80418-capture.jpg|565x313](upload://yniOTscrSUOvQK8PL1AThK4yxcW.jpeg)

I’m sure it’s a simple fix, but I am a complete nooob & have only the slightest idea of what I’m doing lol. Thanks in advance for any help.

As you’re using JS, you need “import”, not “using”. And it should be at the top of the file.

From the documentation:

#pragma strict
import UnityEngine.SceneManagement;

public class ExampleClass extends MonoBehaviour {
    function Start() {
        // Only specifying the sceneName or sceneBuildIndex will load the scene with the Single mode