首先 将该代码挂在NGUI的UIroot上或者场景的物体上
using UnityEngine; using System.Collections; public class example : MonoBehaviour { public void Awake() { Screen.SetResolution(1024, 768, true);//自己想要的分辨率,比如1024*768,true表示全屏 Screen.fullScreen = true; } }
原文地址:http://blog.csdn.net/woailvmengmeng/article/details/25780491