private void UnloadModData() { if (this.Data != null) { ModCustomDataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", true, this.Data); } this.Data = new ModHelpersData(); }
//////////////// private bool LoadModData() { var data = ModCustomDataFileHelpers.LoadJson <ModHelpersData>(this, "data"); if (data != null) { this.Data = data; return(true); } return(false); }
//////////////// private bool LoadModData() { bool success; var data = DataFileHelpers.LoadJson <ModHelpersData>(this, "data", out success); if (success && data != null) { this.Data = data; } return(success); }
private void UnloadModData() { DataFileHelpers.SaveAsJson <ModHelpersData>(this, "data", this.Data); this.Data = new ModHelpersData(); }