unity获取设备分辨率
设备分辨率
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Start() {
Resolution[] resolutions = Screen.resolutions;
//foreach (Resolution res in resolutions) {
//}
Screen.SetResolution(resolutions[0].width, resolutions[0].height, true);
}
}
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
