Hey. I was wondering if anyone could tell me how to get the current scene NUMBER. I know how to get the current scene. But what im trying to do is something like “int nextScene = currentScene + 1;” So that i can load the next scene no matter what scene it is. Could someone tell me how?
Hey man, I was having the same struggle today. I think the solution is
sceneID = SceneManager.GetActiveScene().buildIndex;
I think grabbing all scenes, writing them to a static array and then getting the index for the current scene of that array might be a good idea:
//in top of youre script
// gets the curent screen Scene sceneLoaded=SceneManager.GetActiveScene(); // loads next level SceneManager.LoadScene(sceneLoaded.buildIndex +1);
thats the new trick