Hello, I have a scorezone and when player reaches the zone, level is changing. I have level text too, Im displaying level on top of left screen. This code changes scene but in text box, it shows as Level 1 instead of Level 2
What am i missing? Why it is not displaying level 2? How can i display every level in text box?
if(col.gameObject.tag == "ScoreZone")
{
if(isCollected)
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
currentScene = SceneManager.GetActiveScene().name;
levelText.text = currentScene.ToString();
Debug.Log("Current scene: " + currentScene);
}