- Home /
All scripts come up with compiler errors
My scripts, that have been working for me for months, now all "cannot be loaded" because they all have compiler errors...Any suggestions?
Did anyone solve this problem? I just deleted everything that I changed today, but it hasn't started working again, I still get the same error on all of my scripts.
Answer by wyvernfist · Mar 14, 2013 at 08:51 PM
I got this after removing a variable that was used in another script. Try to build your project, then look in the compiler errors for the issue. This will go away once your scripts are fixed.
Answer by k3pp · May 02, 2013 at 01:58 AM
I ran into the same problem, and after mutch struggle, I discovered what happened: I acidentally renamed the class without ranaming the script file. my solution was to rename the file and delete the corresponding .meta file. After this, Unity recreates the meta file and everything went just fine.
Answer by DaveA · Jan 08, 2013 at 10:28 PM
Ok, so without anything to go on, I'll bet you are using UnityScript and not declaring your variables properly:
function Whatever (a)
{
x = a + 1;
Might use to work. Get in the habit of using the type, and use 'var' before new vars:
function Whatever (a : int)
{
var x : int = a + 1;
$$anonymous$$y scripts have been working for months now, and just today they all come up with errors. One of the scripts is the smooth follow script that comes with unity. I have not made any changes to any of them and none of them work now
I too am struggling with the same issue.. one copy of the project i have is fine, the one with some extra scripts is broken. The scripts compile fine in monodevelop however in the editor they all say "The associated script cannot be loaded". Is this the same issue you are encountering?
This is happening to me as well. Happened all of the sudden - the only thing that's changed since I last had no errors was a Windows update yesterday. Otherwise, nothing changed?
I've also had the same problem. In my case I think (I'm not 100% sure) that it occurred after I had closed Unity but left $$anonymous$$onoDevelop open. I fiddled around with some coding, saved and then closed $$anonymous$$onoDevelop. Then when I opened up Unity sometime later all my scripts had compiler errors. Could be some sort of bug.
I also have the same error. I did a build and then baked my lightmaps and bang cannot load any scripts. I didn't touch any of them prior to the error!
Your answer
Follow this Question
Related Questions
Compiler errors 2 Answers
can't add script, Unity says class name doesn't match 6 Answers
Compiler errors when opening unity 0 Answers
the type or namespace name "PostProcessingProfile" could not be found 0 Answers