[SOLVED] Cannot add Level Manager to Inspector

Unity 5.5

I added the LevelManager line but could not associate the object in Unity

Is there something I did incorrectly?

Thanks in advance.

Did you save the script before switching back to Unity?

I’ve modified mine as you did yours, and it works fine in Unity 5.5.

Thank you for replying. Yes I did save the script, but it still didn’t work.

Now when I opened the Project I get this error from the console:

Does this have something to do with the new version? It seems to suggest not to use LoadLevel but to use LoadScene instead…

Thanks in advance!

For some odd reason, I just had to exit and restart Unity, and now it works…

Thank you for the help!

1 Like

Hi all,
I have the same problem (Unity 5.4.3 1f): I added the LevelManager but the object is not associated in Unity.
I also tried to restart Unity and laptop but it doesn’t work.
Any idea what’s wrong?

I had the same problem in unity 2017, and restarting did not help me to fix it. Here is how i made it work:

I deleted the line declaring the levelmanager and saved the script.
Added LevelManager levelManager; (that is without public), saved and tried to start the game which worked.
Added public in front and saved

That fixed it for me, no idea why…

Privacy & Terms