在主相机上添加脚本
//在2017.2之后添加
UnityEngine.XR.XRSettings.showDeviceView = false;
//在2017.2之前添加
UnityEngine.VR.VRSettings.ShowDeviceView = false;
这个属性的意思是:
Description
描述
Globally enables or disables VR for the application.
当前应用全局启用或禁用VR设备
When enabled, VR output is automatically mirrored to the main display. The main window is still controlled by Screen and related APIs.
启用时,VR输出自动镜像到主显示场景。主显示窗口仍然受Screen窗口和相关的API控制。
最后,需要在main camera中设置Target Eye把原本的Both设置为None!