- Home /
Copilation error after adding namespaces.
So for starters, in the beginning my game worked fine. But then I added a new script, and if I try to use
using UnityEngine.SceneManager;
I get an compilation error "All compilation errors have to be fixed bevor entering game mode". I tried deleting the cript and creating a new one and if I dont edit it, it works fine, but if I try to use the namespace I get an error. I dont use the sript anywhere. Also I used the same Namespace in another script in the same Game, and there it is fine. This also happens if I try adding
SceneManager.LoadScene...
but not if I do stuff like creating an integer.
Answer by Hellium · Apr 26, 2019 at 11:51 AM
The correct namespace is UnityEngine.SceneManagement;
Then , you will be able to call SceneManager.LoadScene
Your answer
Follow this Question
Related Questions
error CS0246: The type or namespace name `rect' could not be found. 1 Answer
Positions of the objects in scene view and game view not the same. 1 Answer
How do i make a score system in the main menu. 1 Answer
Remove a prefab from all scenes at build 3 Answers
My scene won't load after building the project but i can hear the audio 0 Answers