My scripts, that have been working for me for months, now all “cannot be loaded” because they all have compiler errors…Any suggestions?
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.
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.
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;