Let’s say you have a custom class that extends ScriptableObject, a pure data object that can thus be serialised just like GameObjects, Components and what have you.
Now, the class starts out using a small signature, maybe just one or two serialisable public data members.
You create your .asset with this, and you look at the .asset file: The inspector kindly shows you what you’ve just created.
Next, you go back and add an additional public member. Now you’ve got a different member signature. If you save the script and immediately go back into the IDE and look at your .asset file again, you’ll see Unity’s smart enough to now show the new data member’s presence – even though that serialised file probably hasn’t even been updated yet.
But this is where things get hazy. Either the IDE in its wisdom has already detected the change to the method signature, and because of that it has gone and updated all .asset binaries that are representations of instances of that class, or else it is just acting as though that .asset file has these new members, when really, it doesn’t yet (I strongly suspect this).
The second part is this. What if, rather than adding certain members, I removed some? Would Unity then automagically go and update all those .asset files, removing the erstwhile data members preemptively? Or is that now-extraneous data just left inside the binary, like so much junk in the average animal’s genome?
(This is setting my teeth on edge because I’m working with this serialised data at the moment and they are ultimately for mobile deployment, so I would like to be reasonably sure that I can persist with the same versions I’ve been using all along – or I’m going to have to rebuild the levels from scratch using the “final” (ha, ha) class signature, in order to avoid oversized binaries.)