What's this error?

Hi guys,

I’m using JavaScript and I keep coming across this error:

the class defined in script [myScriptNameHere] file name does not match the file name

this only happens when i copy the project folder over to my external hard drive and try and open it from there, the original has no problems.

what am i doing wrong?


When you write Javascript files in Unity the editor does some things behind the scenes to make the filename and the class that is defined to be the same. I fully expect that when you move the project over to an external hard drive somehow the names of the files are being changed, well, their casing, specifically. This can mess things up. Perhaps zip the project up and move it, then unzip on the new machine.