unity获取设备分辨率

来源:互联网 发布:java opc 编辑:程序博客网 时间:2024/05/17 06:13

设备分辨率

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


0 0
原创粉丝点击