-
Notifications
You must be signed in to change notification settings - Fork 6
Serialization Utils
LordMidas edited this page Mar 11, 2025
·
2 revisions
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.
- NOTE: MSU guarantees backwards compatibility for documented features and code only. Undocumented features/code of MSU may be changed at any time without notice, so we advise against using/referencing such code in your projects.
- For bug reports or feature requests, please create issues.
- If you would like to join the team, write to us at msu.team@protonmail.com.