Entire Projects Corrupted by "no monobehaviour" bug
Running Unity 2019 and VS 2019. Every project I've made has at some point become corrupted. I'll be editing scripts and then I'll check on Unity and every script in the project will have the "no monobehaviour..." error message displayed. I have to start a new project, create new scripts, copy all the code into the new scripts, and continue working until it happens again in a couple of days. Does anyone have any ideas?
To be clear, it also ignores the monobehaviour for new scripts containing only the automatically generated default content from Unity (only the empty start and update methods). The class names match the file names exactly. So I can't even create new scripts in that project anymore.
Answer by wcmclamb7908 · Mar 06, 2021 at 05:02 AM
i was being dumb, which is what I thought the problem would ultimately be. I had build errors in my code which resulted in Unity telling me it couldn't find the monobehaviour. Still getting used to the UI in unity. I fixed the error in the file that was bad and all the files came back to functionality.
Your answer
![](https://koobas.hobune.stream/wayback/20220613030252im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
2 Guns aren't meant to fire together but they do 0 Answers
Referencing instances of scripts based on the GameObject they are attached to. 0 Answers
how to unhide cursor when going to main menu? 1 Answer
Please Help Me: Assets/Scripts/PlayerControaller.cs(34,33): error CS8025: Parsing error 1 Answer
GetComponent("string") not working like GetComponent<>() ? 1 Answer