0

This is an image of the errors This is the script

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManager; public class LevelComplete : MonoBehaviour { public void LoadNextLevel () { SceneManager.LoadScene(SceneManager.GetActiveScene().BuildIndex + 1); } } 

Please help me with the errors

I tried to debug the error by checking the script and UI animations that connect to the event that changes the scene. I also tried using SceneManager.LoadScene (name); but it did not work.

1 Answer 1

2

You have two issues here. First of all, you declared the class twice. It might be twice in the same file, or in different files. Second of all, you need to use UnityEngine.SceneManagement instead of SceneManager.

The simplest solution is to check for double declarations, and for the using, replace using UnityEngine.SceneManager; with using UnityEngine.SceneManagement.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.