"Level Manager" trying to update deprecated code

Hi guys, I am new to unity, and I am currently trying to learn code via some Udemey videos. I am running into some deprecated code on line 12. I know that I need to update line 12 to SceneManager.LoadScene, however I am very new to programming and don’t have a strong enough understanding to fix it beyond that. Any help would be greatly appreciated. Thanks in advance.

public class LevelManager : MonoBehaviour {

   public void LoadLevel(string name) {
        Debug.Log("level load requested for: " + name);
        SceneManager.LoadScene(name);
    }
    public void QuitRequest() {
        Debug.Log("I want to quit!: ");
        Application.Quit();
    }
    public LoadNextLevel() {
        Application.LoadLevel(Application.loadedLevel +1);
    }
}

It is indeed a little confusing to switch from the Application to SceneManager class, as the implementation is considerably (and needlessly imo) more complex.

Here’s how line 12 should look:

   SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);

Anyhow, always check the Unity Scripting API for these types of things, and you’ll usually get a really good idea (if not a code sample) of what you need to do.

Good luck learning Unity!