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