private void Migrate() { var gameSaveVersion = Migration.saveVersion; saveVersion = new PlayerPrefsData <int>("SAVE_VERSION", gameSaveVersion); saveVersion.Save(); if (saveVersion > gameSaveVersion) { throw new UnityException($"Cannot migrate {saveVersion.Value}->{gameSaveVersion}"); } Debug.Log($"STARTING VERSION MIGRATION: {saveVersion.Value}->{gameSaveVersion}"); while (saveVersion.Value < gameSaveVersion) { Migration.Step(saveVersion); saveVersion.Value++; saveVersion.Save(); } Debug.Log($"SAVE VERSION IS NOW CURRENT: {saveVersion.Value}"); Debug.Log("Inventory: Migration successful!"); }
void SaveAll() { saveVersion.Save(); disableWait.Save(); firstLaunch.Save(); audioStatus.Save(); playerState.Save(); worldState.Save(); currentCompanion.Save(); ftueState.Save(); }