问题:
强制设置程序运行的分辨率
解决办法:
在程序开始运行时就对分辨率进行设定
设定方法如下:
void GetResolution()
{
int width = Screen.currentResolution.width;
int height = Screen.currentResolution.height;
Resolution[] resolutions = Screen.resolutions;
foreach (var i in resolutions)
{
//print(i.width + "x" + i.height);
if(i.width==width&&i.height==height)
{
Debug.Log(i.height+"*"+i.width);
}
}
Screen.SetResolution(width, height, true);
}