- Home /
Current scene number
Could anybody please show me how to get the current scene number? Actually, I want to code like this "Current Level Number + 1". (whenever player finished, he would go to next level automatically).
Comment
Answer by Andre-Odendaal · Mar 14, 2016 at 06:11 PM
With Application.loadedLevel now obsolete in Unity 5 use
SceneManager.GetActiveScene().buildIndex
Returns the index of the scene in the Build Settings. Always returns -1 if the scene was loaded through an AssetBundle.
Your answer
Follow this Question
Related Questions
Multiple Instances of My Current Scene? 0 Answers
Load Scene by audio clip 2 Answers
How can I save the player's progress in-game? 1 Answer
How to see what level is running? 2 Answers
What is the Difference betwwen a "Level" and a "scene" 2 Answers