0
\$\begingroup\$

One of my game objects used to have a script that I have now deleted on purpose. Now it keeps saying this message as a warning:

The referenced script on this Behaviour is missing!

How can I rid of that?

\$\endgroup\$
3
\$\begingroup\$

Remove the missing reference from your GameObject. You attached your script to something, remove the now missing component, and done.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ It also happens when you rename the file and the Class somehow, that's why I actually asked. I did copy the content of the script anyway, then removed the file, and finally remaking all over again. Oh, and pasted the code of course. \$\endgroup\$ – Fabián Apr 22 '14 at 20:42
  • \$\begingroup\$ Renaming in Unity works actually, outside probably not. \$\endgroup\$ – kat0r Apr 22 '14 at 21:40
  • \$\begingroup\$ @Fabián That is because the class name and file name no longer matchup. If you change the class name to match it should work \$\endgroup\$ – Zach Saucier Jul 7 '16 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.