Files
old-sources-modded/1.3-beta2/Loading.cs
T
2025-08-28 14:26:56 -07:00

29 lines
863 B
C#

using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class Loading : MonoBehaviour
{
public float clientVersion;
public TMP_Text statusText;
public Button updateButton;
private void Awake()
{
QualitySettings.vSyncCount = PlayerPrefs.GetInt("Setting5", 1);
Screen.fullScreen = PlayerPrefs.GetInt("Setting1", 1) == 1;
PlayerPrefs.SetFloat("latestVersion", clientVersion);
if (!PlayerPrefs.HasKey("iconSelected"))
{
PlayerPrefs.SetInt("iconSelected", 1);
}
PlayerPrefs.SetInt("icon", Mathf.Clamp(PlayerPrefs.GetInt("icon", 0), 1, 4));
PlayerPrefs.SetInt("overlay", Mathf.Clamp(PlayerPrefs.GetInt("overlay", 0), 0, 9));
PlayerPrefs.Save();
SceneManager.LoadScene("Menu");
}
}