Legacy save conversion [Untested but should work]

This commit is contained in:
2025-08-25 13:30:48 -07:00
parent 50eb3dc128
commit ea9b393d7b
2 changed files with 329 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
using System;
using TMPro;
using UnityEngine;
using UnityEngine.Networking;
@@ -22,6 +23,21 @@ public class LoadingMenu : MonoBehaviour
Application.targetFrameRate = 360;
QualitySettings.vSyncCount = 0;
}
if (PlayerPrefs.GetInt("LegacyConversion", 0) == 0)
{
if (PlayerPrefs.GetString("latestVersion", Application.version) == "1.4.0-beta1")
{
PlayerPrefs.DeleteKey("Setting2");
PlayerPrefs.DeleteKey("Setting3");
PlayerPrefs.SetInt("Setting2", PlayerPrefs.GetInt("Setting4", 0));
PlayerPrefs.SetInt("Setting3", PlayerPrefs.GetInt("Setting5", 0));
}
if (PlayerPrefs.HasKey("HighScore"))
{
PlayerPrefs.SetString("HighScoreV2", Math.Max(PlayerPrefs.GetInt("HighScore"), 0).ToString());
PlayerPrefs.DeleteKey("HighScore");
}
}
PlayerPrefs.SetString("latestVersion", Application.version);
updateButton.onClick.AddListener(() =>
{