- Home /
Cant Add Script (or create any new scripts) Javascript
I know this is a common issue but I have spent quite a long time researching various people with similar issues and none of them applied to my particular situation. I tried to create a new script and rename it within MonoDevelop. Unity gave me an error about changing the ".meta" file for the NewBehaviourScript.js and I could not attach the script to anything without an error so I renamed the file to its original name. The issue still remained. I tried restarting Unity and deleting the script but all new scripts cannot be attached to objects. Every time, I get the error message:
I am currently completely unable to create scripts at all. Does anyone know how to fix this issue? To be clear, I am getting this error now with any script that I create, even if they are empty and freshly created.
Here is a screen grab of an empty, just created, not renamed file producing this error.
It is a script (in JavaScript) I wrote but could not use yet because this happened.
I tried adding a new empty script to a gameobject and that also produced an error.
How about you post the Code that you made that might help.
The code that is currently in the file is shown on the right in the second screen shot, it is the autogenerated code. The code that I originally put in the file had no effect on the error message.
Answer by ThomasMarsh · Jan 14, 2015 at 06:44 PM
I managed to fix my own issue by updating Unity to the most recent version. Still not sure exactly what caused it.
Answer by TheOcelot4000 · Jan 14, 2015 at 01:52 AM
i don't know if this will help But how about you try to not rename it?
I already tried making a new script and not rena$$anonymous$$g it.
Your answer
Follow this Question
Related Questions
Why are these errors messing with me? 2 Answers
syntax errors 1 Answer
9 errors in Javascript 1 Answer
Ending my game 3 Answers
Script Errors Not Sure Why 0 Answers