Help: Unable to add script

Hi all, having some trouble adding one of my scripts to an empty object. I keep getting the message

“Can’t add script” as the script file name does not match the class defined.

However the filename is Spawner.cs and the class name is Spawner.


Are they not the same?

Most likely the namespace you’ve added.

You are indeed correct! Thanks, seems tho VS2010 adds the namespace in to every new file. Removed and everything works as should.

Thanks for the help