Can't add script component, cannot be found (names match, no compile errors)
I'm completely at a loss right now what the problem is. I've checked many of the other threads where this question was asked, but it is always due to a naming issue. It feels like I have checked the names of my files and classes a 100 times already. I'm including screen shots of the code as it is and the errors when I try to attach the scripts to an gameobject. There are no compile errors what-so-ever.
I've tried deleting the meta files and reopening the project and reimporting all multiple times.
Screenshots: http://imgur.com/a/pCnY1
Answer by Commoble · Mar 17, 2017 at 03:11 AM
"Can't add script component "FPS Counter because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match."
Your file names and class names don't match. Take the space out of the file names.
Wow, I can't believe I didn't consider that. Does Unity split the names in the Inspector pane automatically? I'm following along with a tutorial and the pictures in the guide show the script names split like "FPS Counter" rather than "FPSCounter".
It doesn't matter in the long run, but I can only guess this is why I thought that Unity just removed spaces with matching script names to their classes.