Unity Script not working

Hello, I’m new to Unity and I decided to try out the free version to make some simple games. However this has not been possible due to a persistent error whenever I try to create a new C# script. The error is: “No MonoBehaviour scripts in the file, or their names do not match the file name.”
Naturally I tried comparing the file name to that which is called in the script, however they are exactly the same (even case sensitive). I also don’t understand how the names could be different as this error occurs literally straight after I create a new script in the Project Panel.
Just in case I’m missing something obvious, here are a few screen shots of my project:

I have tried uninstalling and reinstalling Unity multiple times with admin permissions and my antivirus turned off (as it had caused other problems in the past). I have searched around the internet a fair bit in the hopes of finding a solution but so far I have been unsuccessful :(. If anyone knows anyway that I can fix this problem, I’d really appreciate it. I’ve wanted to get into Unity for some time now (previously only used GameMaker) but this has been a real roadblock! If you need anymore info, just let me know, and thanks in advance for any help!

I think you’ve found a bug in Unity. Seems like the compiler fails to run when Unity is installed in a folder with ’ (apostrophe) in it :wink:

Uninstall it and install it in a nicer place, I’m pretty sure this will help.

Thanks Flipbookee, that does appear to have fixed the issue! :slight_smile:

1 Like

i am having problems with using a script that i know should work properly

when i try to test the script it just says " all compiler errors have to be fixed before entering playmode"
and when i have the inspector look at the script it says " no monobehaviour scripts in the file, of thier names do not match the file name." except their is a monobehaviour script in the file and the names all match the file names

please help i have no idea what i did for this to happen and have no idea as to how to fix it