On the LoadNextScene method why won’t the ++ operator work for incrementing the scene? My novice brain doens’t understand the difference.
This works:
public void LoadNextScene()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex + 1);
}
This doesn’t:
public void LoadNextScene()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex ++);
}