Serialization Utils - MSUTeam/MSU GitHub Wiki
File path: mod_msu/msu/utils/serialization.nut
::MSU.Serialization.serialize( _object, _out )
// _object can be any data type
// _out is the C++ object passed to squirrel onSerialize functionsPuts _object inside an instance of ::MSU.Class.ArrayData and serializes it into _out. This function can be conveniently used to serialize arrays, tables or any other data type without having to manually call the respective write functions of the _out object for all the data to be serialized.
::MSU.Serialization.deserialize( _in )
// _in is the C++ object passed to squirrel onSerialize functionsDeserializes the object that was previously serialized using ::MSU.Serialization.serialize.
::MSU.Serialization.isLoading()Returns true while the game is loading a saved game.
::MSU.Serialization.isSaving()Returns true while the game is saving a game.