I have this problem where every single script says «The accociated scirpt can not be loaded. Please fix any compile errors and assign a valid script». It happend all at the aame time. There are no errors in my scripts. My console is filled with «library\packagecache… Pleaseeee help me im stressed
The library folder can safely be deleted. Unity will then go ahead and rebuild it, hopefully with no errors.
Steps i recommend:
- Close Unity.
- Make a backup of your whole Unity Project folder, just in case.
- Delete the Library folder
- Reopen Unity and wait until it has rebuilt everything.
- Hope that the problem is fixed. If not post the first error the Console spits out.
I start every project by going into the package manager and disabling everything but the package manager UI and textmeshpro in case I want to use their UI system with fonts; might solve the issue.
When i reopen unity, the library folder is back. Is it supposed to?
Also, i always update unity. May that be the cause? Is it important to update?
It did not work
Yes, that is the point. That folder might get messed up sometimes and all of it’s contents are just temporary stuff. So deleting it forces Unity to regenerate all of it’s contents, which can be helpful. I needed to do that after upgrading to a newer version of Unity. Sorry it didn’t help i your case.
It is important if the newer version has something new you absolutely want to have in your game. Otherwise it is a risk and you should always backup your project before you do so!
I would go ahead and try what adehm suggested. Get rid of packages you do not need. The errors you get are most likely coming from some package that needs to be updated or removed. Just check the first error you get and see if it mentiones a package that is installed via the package manager. See this recent thread . I hope that helps.