Unity script errors

After opening Unity Hub project which was saved multiple times, I saw that every script was missing from their objects.
The error shows: “The associated script cannot be loaded. Please fix any compile errors and assign a valid script.”
There are no errors present. I reassigned the scripts, saved and reopened Unity and it happened again. What can I do?
Thanks in advance!

Maybe the project isn’t saving properly?

I tried it multiple times and got the same result. That can be the case, I don’t really know.

Hi ClayD,

Welcome to our community! :slight_smile:

Where do you save your project folder? On an internal harddrive and not in the Desktop folder? Do you use an antivirus program or a firewall that might be blocking Unity oder that might be deleting files?

Hello Nina,
It is saved on my desktop folder. I use no antivirus or firewall.
In VS Code I have been getting a net core sdk not located error for quite some time but it didn’t seem to affect any other project on unity. Can that be the case somehow?

The Desktop is a special folder managed by Windows. It is usually not recommended to save anything there except for shortcuts. It might well be that Windows deletes your files.

Move your project folder and do not keep it in the Desktop folder. You may use a shortcut on your desktop, though.

Then test Unity again and check if you are able to save files and if they remain in your assets folder.


See also:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms