We are working on a VR Standalone application that renders at the same time on the headset and the monitor. We have a custom camera rendering on the monitor, with UI a second user can interact with while the VR user has the headset on.
For the vrless user, we want the fullscreen mode to be “Windowed” and we have toggled “Resizable Window” on.
The issue.
After upgrading to the new Unity XR Plug-in management, resizing the build’s window doesn’t refresh the image inside the window, UI elements aren’t selectable due to wrong positioning and there are visual artefacts in the resized area if we minimize/maximize the window manually (dragging).
I’ve confirmed that the source of this issue is the new Unity XR Plug-in Management. Before the upgrade window resizing worked ok. It also works if we skip the VR initialisation and we have just the vrless version running.
Environment
Unity 2019.4.17f1
All packages are up to date via the Package Manager.
The same happens when we initialise either Oculus or OpenVR
Windows 10
XR Plug-in management is not really the issue here. This would actually be due to the plug-ins you are using. Does this happen all the time, or only after Play in Editor?
Can you slim this down to a minimal repro project that you can share?
It only happens when I resize the standalone build’s window (I’m on Windows 10), which is set to windowed + Resizable Window. This is not an Editor issue, it only happens on the builds.
If I initialise XR this happens, if I don’t it doesn’t.
It doesn’t make any difference if I initialise Oculus or OpenVR.
I’ll try to get you a new project with just Oculus Plug-in and the initialisation script I use to load up the XR. That’s the only thing needed to reproduce it I’d say.
Just to be sure it wasn’t something about my project, I reopened the streamlined project I sent you @joejo with 2019.4.20f1. Went straight to build and it’s still broken.
Just wanted to chime in and say we’re seeing the same thing here (2020.1.16). In our case we want to switch whether the app renders in VR or standard based on Common.userPresence. Afaik the best way to do this is have XR initialised and toggle the active state of the two different cameras.
@Adrian-Anta 2019.4.25f1 released and it includes the proper fix for this resizing artifacts issue.
Release note as below:
XR: Fixed Windows player window resizing artifacts when XR enabled and VR device running on 2019.4 branch. (1288886)
Please give it a try and let me know if that works for you.
Thanks!