using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Start() {
Resolution[] resolutions = Screen.resolutions;
foreach (Resolution res in resolutions) {
print(res.width + "x" + res.height);
}
Screen.SetResolution(resolutions[0].width, resolutions[0].height, true);
}
}
【Unity开发】Unity获取设备屏幕分辨率
最新推荐文章于 2024-10-07 14:55:12 发布