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




原文地址:https://www.cnblogs.com/nafio/p/9137223.html