static void Main(string[] args) { var screenResolutionChanger = new ScreenResolutionChanger(); var maxScreenResolution = screenResolutionChanger.GetMaximumSupportedScreenResolution(); screenResolutionChanger.SetResolution(maxScreenResolution); }
private void Awake() { if (instance != null) { Destroy(this.gameObject); return; } instance = this; Screen.SetResolution((int)((float)Screen.width * 0.5f), (int)((float)Screen.height * 0.5f), true); DontDestroyOnLoad(this.gameObject); }