Can be called by the user to obtain an object to be serialized externally. This allows the user to combine custom data with gui state and save it all to one file. Complements .fromObject().
.fromObject()