I’ve bumped into this more than once…usually when I double click on the name of a script file to change it … so in the first image I changed the file name from splash_timer to SplashTimer. No biggie right? Except when I try and drag it onto a game object I get a big fat error. (see pic)
The PROBLEM is that I have renamed the script but not the class (which the error message clearly tells us this but who reads those silly messages!?) … the class name is now out of sync with the script name and Unity hates that. Simply open the script and change the class name to the name of the script and viola! (see pic #2 )