Save System
Warning!
SaveableTypeDefiner
public class CustomSaveDefiner : SaveableTypeDefiner
{
// use a big number and ensure that no other mod is using a close range
public CustomSaveDefiner() : base(2 _333_000) { }
protected override void DefineClassTypes()
{
// The Id's here are local and will be related to the Id passed to the constructor
AddClassDefinition(typeof(CustomMapNotification), 1);
AddStructDefinition(typeof(ExampleStruct), 2);
AddClassDefinition(typeof(ExampleNested), 3);
AddStructDefinition(typeof(NestedStruct), 4);
}
protected override void DefineContainerDefinitions()
{
ConstructContainerDefinition(typeof(List<ExampleStruct>));
}
}SaveableField and SaveableProperty
CampaignBehaviorBase.SyncData
Notes:
Last updated