Screen.currentResolution 当前分辨率

static var currentResolution : Resolution[]

Description描述

The current screen resolution (Read Only).

当前屏幕的分辨率。(只读)

If the player is running in window mode, this returns the current resolution of the desktop.

如果玩家是运行在window系统,返回当前桌面的分辨率。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(Screen.currentResolution);
	}
}
print(Screen.currentResolution);
Page last updated: 2011-1-17