首页 > 编程语言 > 详细

Unity的分辨率

时间:2019-05-31 14:45:54      阅读:133      评论:0      收藏:0      [点我收藏+]

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);
}

Unity的分辨率

原文:https://www.cnblogs.com/clhxxlcj/p/10955013.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!