Error message "Can't Add Script"

I keep getting the error message “Can’t Add Script Can;t add component “NewBehaviourScript” b/c it doesn’t exist. Check to see if the file name and class name match”.

I’m on version 4.6.1f1 of Unity, on a mac running OS 10.8.3

I can no longer add new or old scripts which I had successfully added to the game objects previously.

If I open another Unity project, I am able to add scripts to game objects with no error messages.

If I create a ‘clean’ script like “NewBehaviourScript” , I cannot add it to the sphere object. Is it possible that my project is corrupt?

Look up the body of the message “see if file name and class name match.” Very common, lots of examples and suggestions.

Your scripts shouldn’t be named “NewBehaviourScript” anyway. First thing you do is give them a real name. Very easy, lots of info on it. Also shouldn’t have any scripts just laying around with errors in them, since you can’t test the game. Very easy to at least to comment-out error-fixes.

I think if you just keep using Unity, maybe in your 2nd project, and reading the docs, lots of beginner mistakes will go away.

Thanks for the reply. I had an unfinished script from a tutorial I’m following and the errors I didn’t correct stopped me dead. Now I know…