unity设置全屏和退出全屏

匿名 (未验证) 提交于 2019-12-02 23:42:01
 using System.Collections; using System.Collections.Generic; using UnityEngine;  public class fullscreen : MonoBehaviour {  	// Use this for initialization 	void Start () { 		 	} 	 	// Update is called once per frame 	void Update () {         //  按ESC退出全屏         if (Input.GetKey(KeyCode.Escape))         {             Screen.fullScreen = false;  //退出全屏                   }                  //按A全屏         if (Input.GetKey(KeyCode.A))         {             Screen.SetResolution(1600, 900, true);              Screen.fullScreen = true;  //设置成全屏,         }     } } 


FR:徐海涛(hunk Xu)
QQ技术交流群:386476712

文章来源: https://blog.csdn.net/qq_15267341/article/details/91884383
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!