Mod Content class to easily save and load data that should persist between sessions. All saved data are strings.
public abstract class ModTowerSaveData : BTD_Mod_Helper.Api.ModContent
Inheritance System.Object ModContent ModTowerSaveData
Derived
↳ ModTowerSaveData<T>
The associated base tower id of this ModTowerSaveData.
public abstract string TowerBaseId { get; }
Loads this ModSaveData from the provided encoded string.
public abstract void Load(string data, Tower tower);
data System.String
The encoded save data.
tower Il2CppAssets.Scripts.Simulation.Towers.Tower
The tower getting loaded.
public override void Register();
Saves this ModSaveData using the returned encoded string.
public abstract string Save(Tower tower);
tower Il2CppAssets.Scripts.Simulation.Towers.Tower
The tower getting saved.
System.String
The encoded save data.
Returns whether this ModTowerSaveData should save for the provided tower or not.
public virtual bool ShouldSave(Tower tower);
tower Il2CppAssets.Scripts.Simulation.Towers.Tower
The tower to save for
System.Boolean
Whether this ModTowerSaveData should save this tower or not.