Resizing build's window while Unity XR Plug-in is initialised -> visual artefacts

For context.

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

Thank you.

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.

When you say builds window, are you talking about the Unity Build window?

I mean the windowed window you get when you execute the standalone build. It doesn’t matter if the build is Mono or IL2CPP.

This is not an editor issue. The executable build’s window is the issue.

Hope it makes sense.

@joejo I sent you a PM with the project attached.

Any questions please ask. Regards.

Hey,

This resizing issue was fixed recently. Please see the issue tracker for reference:
https://issuetracker.unity3d.com/issues/xr-sdk-player-window-image-scaling-is-multiplied-when-player-window-is-resized
Fixed with 2021.2.0a1, backported to 2021.1.0b2, 2019.4.20f1 and will also backport to 2020.2, please stay tuned.

1 Like

@Tanya_Li @joejo I downloaded 2019.4.20f1 today, made a build and this issue is still there.

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.

Hey,

I will investigate it. Will keep you updated.

Thanks,
Tanya

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.

Also wanted to chime in to say we’ve got the same issue on our VR app.

https://www.youtube.com/watch?v=J3BIP4AL6eY

It wasn’t an issue when we were on 2019.3.4f1

@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!

@Tanya_Li , thanks, in Unity 2019.4.25 the player window is rendered correctly after resizing.
However, it flickers during the resizing.

1 Like