Application.LoadLevel ("Scene" + commandModifier); is obsolete?

I followed a tutorial that was a little old, and the line

Application.LoadLevel (“Scene” + commandModifier);

is obsolete, so I need to use SceneManager now, but I’m not sure how… I’m completely new to coding and programming and I’m using/learning c#…any suggestions?

here’s the code:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class ChoiceButton : MonoBehaviour {

public string option;
public DialogueManager box;

// Use this for initialization
void Start () {


// Update is called once per frame
void Update () {


public void SetText(string newText) {
    this.GetComponentInChildren<Text> ().text = newText;

public void SetOption(string newOption) {
    this.option = newOption;

public void ParseOption() {
    string command = option.Split (',') [0];
    string commandModifier = option.Split (',') [1];
    box.playerTalking = false;
    if (command == "line") {
        box.lineNum = int.Parse(commandModifier);
        box.ShowDialogue ();
    } else if (command == "scene") {
        Application.LoadLevel("Scene" + commandModifier);


I already put

using UnityEditor.SceneManagement;

at the top but I don’t know how to do the load level part…Sorry if this is a dumb question…haha

Well, you will get the warning saying that Load level is obsolete and use ‘SceneManager.LoadScene’ instead. So, just replace the method, and include ‘using UnityEngine.SceneManagement’ at the top.

Try this:

SceneManager.LoadScene (“Scene” + commandModifier);

you can read more in here:

using UnityEditor.SceneManagement;

// Call


added to the beginning:

using UnityEngine.SceneManagement;

and then to use:

SceneManager.LoadScene ("Scene" + commandModifier);

You con see Unity - Scripting API: SceneManagement.SceneManager.LoadScene
for more details