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 functions
Puts _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 functions
Deserializes the object that was previously serialized using ::MSU.Serialization.serialize
.