no monobehaviour scripts in the file, of thier names do not match the file name.

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

Could you post the exact filename of the classes file and the class definition?
Normally it’s when typing the name of the file and the name of the class separately that it’s easy the have a typing mismatch.

They are the same…

That looks awfully like something in your unity installation is corrupted.
The likeliest fix would be to reinstall Unity.

I just tried reinstalling Unity, but the problem is still there… :confused:

i searched everywhere can’t find a solution … does anyone know how to fix this ? i would rly appreciate it

bump

Try uninstalling unity first, and then reinstalling, I know you said you already reinstalled. Also make sure to download a new installer in case you didn’t the first time. There’s nothing wrong on a coding level though, if the problem persists it could be a problem with your computer.

I met the same problem, did you solve the problem?

I also faced this problem on ubuntu18.04.