using System.IO; using TMPro; using UnityEngine; using UnityEngine.UIElements; using System.Collections.Generic; namespace JTN { public class Startup : MonoBehaviour { public bool changeResolutionAutomatically; public bool useStartupScriptHere; public Utils UtilsScript; public TMP_Text MessageText; [ShowOnly] public int MissingAssetFiles = 0; public List FilesThatMustExistInStreamingAssetsToSwitchScenes = new List() { Path.Combine("Audio", "GeneratedSoundBanks", "Windows", "BGM_S.bnk"), Path.Combine("Audio", "GeneratedSoundBanks", "Windows", "Init.bnk") }; [ShowOnly] public string MissingFiles = ""; public GameObject DevMenu; public GameObject ObjectWithUIDocument; public void resoChange() { if (!PlayerPrefs.HasKey("FullscreenState")) { if (changeResolutionAutomatically && useStartupScriptHere) { Screen.SetResolution(1280, 720, false); Debug.Log("Changed game resolution to 1280x720"); } } else { int FullscreenState = PlayerPrefs.GetInt("FullscreenState"); //if (PlayerPrefs.HasKey("FullscreenState")) // UtilsScript.SetFullscreen(bool.Parse(PlayerPrefs.GetString("FullscreenState"))); } } public void ActivateContainer() { UIDocument UIDoc = ObjectWithUIDocument.GetComponent(); VisualElement root = UIDoc.rootVisualElement; root.Q("Container").visible = true; root.Q("ExtraContent").visible = true; } private void Start() { if (useStartupScriptHere) { UIDocument UIDoc = ObjectWithUIDocument.GetComponent(); VisualElement root = UIDoc.rootVisualElement; root.Q