I was working on my Unity project and for some reason I got this error: “No MonoBehavior scripts in the file, or their names do not match the file name”. So I checked my MonoBehavior and I couldn’t figure out what was wrong… I went back to my Unity and saw that my scripts folder and all my scripts suddenly disappeared ! So I went to my file program and saw my scripts folder there, but when I tried to open it, it said: Access Denied… Also I tried to find my scripts back in my trash folder but also nothing there… Does anyone know how to fix or reset this to get my scripts back?
It’s an operating system issue.
Unity can’t access the contents of the folder, same as your “file program”.
Because something told the OS that you (so Unity as well) don’t have the rights to see the contents.
Either you locked yourself out from the folder by accident, or you have a virus which did it.
Go look up how to set access rights to folders/files in your operating system.
I started this project from today so it weren’t that many scripts, but still I worked a couple of hours on this…