All compiler errors have to be fixed before you can enter playmode! UnityEditor.SceneView:ShowCompileErrorNotification() but my script has 0 errors

i don’t get it

I had this problem the other day. I believe this is just a Unity bug. What I understand it as is there is some errors in the editor and it is failing to compile because of that. However, in my case, it was still allowing me to enter playmode. It just wouldn’t allow me to do a build.

Heres what I would suggest checking:

  1. Make sure you can do a build of your code outside of Unity. This will tell you that your code is good.
  2. Restart Unity and try to go into play mode again. Although this most likely won’t fix the error, it will hopefully trigger Unity to actually tell you what the problem is.
  3. My last trick is try making a change in any of your scripts and then change it back again. Each time you make a change and save a script, unity recompiles.