- Home /
Question by
EmilioDLC · Jul 02, 2020 at 01:37 PM ·
project settings
windowed mode is still broken Unity 2019
Hi,
I have a VR project with HTC Vive pro and the deprecated OpenVR XR settings (HTC still lagging behind on this). I want my application to have windowed mode and have found extensive posts of disgruntled developers with this issue since 2017. Even the certified correct answers still don't work for me. I am also working on a 2 display system. Upon pressing the toggle, I can see the Windows 10 task bar on one of the displays, but if I click a few times, the app starts getting seizures and blacks out for a few frames at a time. You can bet I've ticked Windowed mode, re sizable window and fullscreen switch under resolution and presentation settings. My relevant code:
void Start()
{
// for (int i = 0; i < Display.displays.Length; i++)
Display.displays[1].Activate();
}
public void ToggleFullscreen(bool fullscreen)
{
Screen.fullScreen = fullscreen;
if (Screen.fullScreen)
{
Screen.fullScreenMode = FullScreenMode.ExclusiveFullScreen;
}
else
{
Screen.fullScreenMode = FullScreenMode.Windowed;
}
}
Comment