fix playerprefs usage + rename audiobundles

This commit is contained in:
mangorifo
2024-02-04 17:52:19 +08:00
parent b3bb082a6b
commit 4804b2e0e5
12 changed files with 616 additions and 192 deletions
+3 -11
View File
@@ -1,7 +1,6 @@
using System.IO;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
@@ -11,6 +10,7 @@ namespace JTN
{
public bool changeResolutionAutomatically;
public bool useStartupScriptHere;
public Utils UtilsScript;
public TMP_Text MessageText;
[ShowOnly] public int MissingAssetFiles = 0;
public List<string> FilesThatMustExistInStreamingAssetsToSwitchScenes = new List<string>() {
@@ -31,16 +31,8 @@ namespace JTN
else
{
int FullscreenState = PlayerPrefs.GetInt("FullscreenState");
if (FullscreenState == 0)
{
Screen.fullScreenMode = FullScreenMode.Windowed;
Screen.SetResolution(1533, 720, false);
Debug.Log("Changed game resolution to 1533x720");
} else
{
Debug.Log($"Set game resolution to {Screen.currentResolution} (fullscreen)");
Screen.fullScreenMode = FullScreenMode.FullScreenWindow;
}
if (PlayerPrefs.HasKey("FullscreenState"))
UtilsScript.SetFullscreen(bool.Parse(PlayerPrefs.GetString("FullscreenState")));
}
}
private void Start()