using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DispalyScreen : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
//多屏显示
for (int i = 0; i < Display.displays.Length; i++)
{
Display.displays[i].Activate();
//屏幕分辨率
Screen.SetResolution(Display.displays[i].renderingWidth, Display.displays[i].renderingHeight, true);
}
}
// Update is called once per frame
void Update()
{
//退出游戏
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
}
}
Unity 多屏显示代码
最新推荐文章于 2024-08-06 17:56:15 发布