- Home /
Error when i re-load my scene
Okay, so I made a main menu and an in-game menu for my game. My main menu works just fine, it starts the game correctly. However if i go to the main menu from the in-game menu than start the game AGAIN i get an error saying "The referenced script on this Behaviour is missing!"
If i start the level scene first it also works fine until i either press the restart button or go to main menu then start again. Not only I get this error but my controls are disabled. I can still look around but can't move. When i click the error it highlights the FirstPersonController which has a Unity-provided script on it for movement and i didn't change anything in that. I tried two different types of in-game menus this happens with both, however first time i used one of them it worked fine and could restart the level anytime i wanted. Now i just can't.
To be honest I'm not really convenient with programming, I just learn from youtube tutorials and I really try to understand things too. I actually had ideas what could be the problem but now I have no clue.
Please if you have any idea what should I do with this tell me.
I can provide the scripts which are not my own I got one from the unity forum and one from a youtube tutorial. And again, they used to work and the only thing i changed was the position of the buttons, but completely redoing the scripts didn't help either.
Thanks for any help in advance.
P.S.: I used the Application.Loadlevel("level name"); code to load my level.
Please do provide script please. Just from your description alone, I can't help much.
For your info, it is quite unlikely that Application.LoadLevel("levelName")
will create any problem.