示例#1
0
        static void Main(string[] args)
        {
            var screenResolutionChanger = new ScreenResolutionChanger();
            var maxScreenResolution     = screenResolutionChanger.GetMaximumSupportedScreenResolution();

            screenResolutionChanger.SetResolution(maxScreenResolution);
        }
示例#2
0
    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);
    }