Answers for "how to check if there is a next scene in unity"

C#
11

unity next scene

//For C# in unity
UnityEngine.SceneManagement;
....
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
Posted by: Guest on April-01-2020
0

unity next scene

using UnityEngine.SceneManagement;

int currentSceneIndex = SceneManager.GetActiveScene().buildIndex; 
if(currentSceneIndex<SceneManager.sceneCount-1)
{
    SceneManager.LoadScene(currentSceneIndex + 1);
}
Posted by: Guest on February-24-2022

Code answers related to "how to check if there is a next scene in unity"

C# Answers by Framework

Browse Popular Code Answers by Language