Windows/Mac分辨率选择界面
默认设置下,会在游戏运行后会显示一个选择分辨率的对话框。
如果想要去掉的话,可以选择”File -> Build Settings -> Player Settings -> Resolution and Presentation”,将”Display Resolution Dialog”选成”Disabled”。
设置固定分辨率
在Main Camera中加入一个脚本:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScreenSet : MonoBehaviour {
// Use this for initialization
void Start () {
// Set screen resolution to 640x960, non-fullscreen
Screen.SetResolution(640, 960, false);
}
}