- Home /
The referenced script on this Behaviour is missing! (Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1560)
My Unity project appears to have become corrupt. Running it results in many console errors such as this:
The referenced script on this Behaviour is missing!
(Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1560)
I also see many errors like these:
GameObject (named 'Text') references runtime script in scene file. Fixing!
(Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1083)
GameObject (named 'Button') references runtime script in scene file. Fixing!
(Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1083)
As per a few other issues that I googled, I deleted all objects that appeared to be referencing scripts and recreated them. The error persisted.
I then deleted all objects and readded them. No luck.
I switched scenes and the error persisted.
I created an empty scene and added a few UI objects and the errors were back.
What do I do?! I haven't yet backed up my project today :(
Thanks.
P.S. New projects work fine.
Answer by Mandiux · Aug 14, 2015 at 05:22 AM
I had this issue and drove me nuts. I believe it occurred after moving some scrips and files(I was trying to be organized). Every time, I would create a button in UI canvas, it would give me the error, and state it was fixing. I clicked on "Assets" - > "Reimport All" -> will close down and restart Unity3d. Also make sure you save any work. once you restart, go back to the scene with errors and the error will appear again. click Play button, to run the scene and Unity will fix accordingly. After play the scene again, and the error should be gone.
Your answer
Follow this Question
Related Questions
Sound files not working [Unity 5.1] 0 Answers
Unity 5.6 upgrade pains 0 Answers
GLSL: unsupported array parameter 'unity_LightPosition' (and 'unity_LightColor') 1 Answer
Error to compile on windows phone plataform 1 Answer
Unity crashes on startup 0 Answers