Unity 画面质量设置

 

类似王者荣耀里面的 画面质量设置:低,中,高

  void Update()
    {
        if(Input.GetMouseButtonUp(2))
        {
            //width += intervalRes;
            //Screen.SetResolution(width, width, true);

            for (int i = 0; i < QualitySettings.names.Length; i++)
            {
                Debug.Log(QualitySettings.names[i].ToString());


            }
            QualitySettings.SetQualityLevel(3, true);
            Debug.Log(QualitySettings.names[0].ToString());
        }
       
    }

也可以设置屏幕分辨率:

int width=800;

Screen.SetResolution(width, width, true);

你可能感兴趣的:(Unity3D)