Why does unity not see monobehaviour?
I was working on a game, and everything worked fine, until i restarted Unity and every script said it had no monobehaviour. PLS help
Answer by yigitcihat · Oct 01, 2020 at 04:58 PM
Close the solution explorer window in visual studio and then close visual studio and run it again, open the solution explorer again. Problem should be solved. @danivbel
Or copy all code in your script and delete it and create new script with same name and paste your code and save.
Answer by Bunny83 · Oct 02, 2020 at 11:26 AM
Are you sure that you have no compiler errors in your console? By "no" i literally mean not a single one is any of your scripts. If any script has compiler errors, non of your code will be compiled and no script will be working. So first of all make sure there's no compilation error. If the issue still persists with your script, just right click on the script and select reimport. That should force a recompile of all of your code.