Unity 设置分辨率 设置画质(PC)
2021-01-04 02:29
标签:ase screen break oid solution efs deb class color 分辨率 画质 QualitySettings.SetQualityLevel(value, true); 1~6 Unity 设置分辨率 设置画质(PC) 标签:ase screen break oid solution efs deb class color 原文地址:https://www.cnblogs.com/DGJS/p/12986395.html public void ResolutionRatio(int value)
{
// Debug.Log(value);
PlayerPrefs.SetInt("ResolutionRatio", value);
switch (value)
{
case 0:
if (PlayerPrefs.HasKey("resolutionsW"))
{
Screen.SetResolution(PlayerPrefs.GetInt("resolutionsW"), PlayerPrefs.GetInt("resolutionsH"), true);
}
break;
case 1:
Screen.SetResolution(640, 480, true);
break;
case 2:
Screen.SetResolution(1280, 720, true);
break;
case 3:
Screen.SetResolution(1920, 1080, true);
break;
default:
break;
}
}
上一篇:Java之预定义
文章标题:Unity 设置分辨率 设置画质(PC)
文章链接:http://soscw.com/index.php/essay/39948.html