- Home /
UnityEngine.SceneManagement contains no methods?
Here's a bit of an odd problem. I'm trying to use the 5.3.2f1 version of Unity for the new scene manager features, and after doing the whole "using UnityEngine.SceneManagement" I can use the usual monobehavior methods such as destroy, don't destroy on load, ect. But all of the methods that are supposed to be there, like the ones for loading scenes, I can't use.
The methods don't show up in Intellisense, and when I manually type them out I get an error telling me "SceneManager does not contain a definition for LoadScene".
Any ideas? I'm using c# and my Unity version is 5.3.2f1
Accidentally submitted this as an answer rather than a comment. Woops.
As a last resort, I tried reinstalling Unity. And while that did not work on the project I was working in, I can use the scene manager in a new project.
I'd greatly prefer to attempt to fix the issue in the current project, rather than porting everything over, but if that's what it takes then I guess I'll have to do that.
Any chance you have a Scene$$anonymous$$anager class in your project/namespace already that is causing a conflict?
Just checked, and as it happens I do. I renamed it to something else and now I can use the methods from the Unity class. Thank you so much!
I'm not sure what you mean. Are you asking if I'm calling the scene manager from a static method? If so, then no. And if I'm not mistaken, the Scene management class is static.
Answer by meat5000 · Mar 06, 2016 at 11:22 AM
using UnityEngine.SceneManagement
This is INCORRECT for JS and the docs are wrong.
Use
import UnityEngine.SceneManagement;