Unity was not able to run my Invoke command, and im not sure why.

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

}


	

public void CompleteLevel ()

{
Invoke(“LoadNextLevel()”, 2);
completeLevelUI.SetActive(true);

}

First off double check you’re using the UnityEngine.SceneManagement namespace.

Next, when you call Invoke(), you don’t need the brackets after LoadNextLevel, so it should just be,

public void CompleteLevel() {
    Invoke("LoadNextLevel", 2.0f);
    completeLevelUI.SetActive(true);
}

Also, is CompleteLevel() in the same script as LoadNextLevel() ? If not, Invoke() won’t be able to find it.