Changes

Jump to navigation Jump to search
Line 109: Line 109:  
You can also override the serialization methods in the ModMeta class to take complete control of saving data. Returning null will make the mod not save any data. To help you with serializing data from your ModBehaviours, the ModMeta class has a '''ModBehaviours''' list of all active ModBehaviours that were creating when the mod was first loaded. However, the default behaviour is to call Serialize and Deserialize on your ModBehaviours in turn and check if they saved any data, so just leaving it as is will work in most cases.
 
You can also override the serialization methods in the ModMeta class to take complete control of saving data. Returning null will make the mod not save any data. To help you with serializing data from your ModBehaviours, the ModMeta class has a '''ModBehaviours''' list of all active ModBehaviours that were creating when the mod was first loaded. However, the default behaviour is to call Serialize and Deserialize on your ModBehaviours in turn and check if they saved any data, so just leaving it as is will work in most cases.
   −
Note that your the save data is identified by the Name you've set in the ModMeta class. If you change this name, it will no longer be able to find the correct data from older saves and name clashes will result in data loss.
+
Note that your the save data is identified by the '''Name''' you've set in the '''ModMeta''' class. If you change this name, it will no longer be able to find the correct data from older saves and name clashes will result in data loss.
    
== Reading external data ==
 
== Reading external data ==

Navigation menu