using UnityEngine; using System.Collections; using System.Collections.Generic; using System; using UnityEngine.UI; public class SwitchResolution : MonoBehaviour { public static bool showbox = false; //Mostra e esconde a box de resolucao do player public void switchResbox(){ showbox = !showbox; gameObject.SetActive(showbox); } public void resChange(int i){ switch(i){ case 1: Screen.SetResolution(640, 480, false); Debug.Log ("640"); break; case 2: Screen.SetResolution(800, 600, false); Debug.Log ("800"); break; case 3: Screen.SetResolution(1024, 768, false); Debug.Log ("1024"); break; default: Screen.SetResolution(640, 480, false); Debug.Log ("unknown res"); break; } } }