Beispiel #1
0
 public override void OnSaveData()
 {
     if (Loader.CurrentLoadMode == LoadMode.LoadGame || Loader.CurrentLoadMode == LoadMode.NewGame)
     {
         DebugLog.LogToFileOnly("StartSave");
         var saveData = new byte[638976];
         MainDataStore.Save(ref saveData);
         SaveAndRestore._serializableData.SaveData("RealConstruction MainDataStore", saveData);
     }
 }
Beispiel #2
0
        public override void OnLoadData()
        {
            MainDataStore.DataInit();
            DebugLog.LogToFileOnly("StartLoad");

            var saveData = SaveAndRestore._serializableData.LoadData("RealConstruction MainDataStore");

            if (saveData == null)
            {
                DebugLog.LogToFileOnly("no RealConstruction MainDataStore save data, please check");
            }
            else
            {
                MainDataStore.Load(saveData);
            }
        }