Screen.fullScreen 全屏

static var fullScreen : bool

Description描述

Is the game running fullscreen?

游戏是否运行在全屏模式?

It is possible to toggle fullscreen mode by changing this property:

改变这个属性,可以开关全屏模式:

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		Screen.fullScreen = !Screen.fullScreen;
	}
}
// Toggle fullscreen
//切换全屏

Screen.fullScreen = !Screen.fullScreen;

A fullscreen switch does not happen immediately; it will actually happen when the current frame is finished.

全屏开关不会立即发生,它实际发生是在当前帧完成时。

参考:SetResolution.

Page last updated: 2011-1-17