private void LoadnNextScene()
{
SceneManager.LoadScene(1);
if (SceneManager.GetActiveScene() == SceneManager.GetSceneByName(“level2”))
{
SceneManager.LoadScene(“level3”);
}
}
This is what I’ve done, this is not a good way of doing it if I want to add more Levels.
How should I fix this?