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




posted @ 2016-12-05 16:33  00000000O  阅读(701)  评论(0编辑  收藏  举报