IExternalizable - how does reading work?

Subscribe to IExternalizable - how does reading work? 1 post

avatar for vesperbot vesperbot 1849 posts
Flag Post

I now need to make me a save game, for this I have to save a decently complicated object, with its simple fields, both private and public, and an array of nested objects. For this, I have found that implementing IExternalizable is the way to go, perhaps the only one. It wants me to implement writeExternal() and readExternal() functions, the latter returns void… this means, at least a constructor is called. Can someone please explain the call sequence if I have a SharedObject instance that had a “data.myObject” of an object that’s implementing IExternalizable?