When building AssetBundles some scriptable objects get corrupted

I couldn’t find any solution online for this issue. In short: When I build my asset bundles, a few of my scriptable objects get corrupted while some don’t. I have no idea why this happens as they aren’t even in any asset bundles, they are in the Resources directory so they can be loaded after the asset bundles have been loaded into the game.

Here is a screenshot of a corrupted object (foundation):

And here is a screenshot of a non corrupted object:

There are absolutely no errors in any of my code, I get a warning when building my asset bundles:

No script asset for StructureSettings. Check that the definition is in a file of the same name.

I do not understand why any of this is happening!? If anyone does, help would be much appreciated :slight_smile:

There is no solution for this, it is a bug with Unity. I filed a bug report and the Unity team have managed to reproduce the bug 100% of the time. Here is a link to the issue tracker page:

A ScriptableObject must have his own name file.
For example, your StructureSettings definition must be in “StructureSettings.asset” file.
Please check your definition place about StructureSettings.