ScriptableObjects Cloning - Duplicating GOs / Transfer from scene to scene

Good day,

I’m creating instances of ScriptableObjects in the Editor and I’m adding them to an Array in a MonoBehaviour that resides on GOs.

Creating instances is fine, everything works as it should until I either Duplicate / Copy+Paste a GO containing them. Different from how Unity handles duplication of GO’s, the ScriptableObjects are not Cloned but just referenced into the new GO.

So changing the ScriptableObject on one of the duplicated GO changes it across all of its references in other GOs.

Because of that, I also cannot copy GO’s from one scene to another without loosing the ScriptableObjects they contain.

Any way to go arround this?

Okay, I think I found it…

Basically Unity doesn’t Serialize ScriptableObjects fully. Whatever you try to do, it will not be serialized outside of the scene.

Just make your “data” classes extend System.Object instead. You loose the advantages of ScriptableObjects but still better than the alternative.