"sharedassets0.assets is corrupted"

I’m using Unity 4.5, and I’m unable to run my compiled project due to the above error found in the log file. I’ve come across this error before, and I have determined a number of possible causes:

  • Two scripts with the same name - with or without different file extensions
  • A serializable class that derives from an abstract class, with that abstract class not marked serializable
  • Missing script errors in GameObjects or prefabs
  • MonoBehaviour/ScriptableObject derived classes not being in their own file with a name the same as the name of the class
  • Classes with the same name as an existing Unity class

I have checked and double checked all these conditions and re-imported all assets, to no avail. My project is currently a single scene with a reasonable amount of content, and an awful lot of code.

Does anyone have any ideas?

Okay, I think I found the error. It seems that certain types of serialized data became invalid in the transition from 4.3 to 4.5. The solution is to re-create the affected components, which typically have members of types that derive from generic classes.

EDIT: Also, nested classes. That may or may not have been a problem too

I also had this issue. For me it was a corrupted Prefab, even with switching to 2019. I recommend using version control software like Github, backing up your project, and then you can delete large swaths of your project (for example, I did one where I deleted scripts, that didn’t work, but then restored to the older version, deleted all prefabs, and the crash stopped.) From there I just had to rebuild prefabs… apparently meshes can also be corrupt. Hope this helps!