Search Unity

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

Discussion in 'VR' started by Adrian-Anta, Jan 21, 2021.

  1. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    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.




     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    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?
     
  3. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    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.
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    When you say builds window, are you talking about the Unity Build window?
     
  5. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    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.
    upload_2021-1-21_23-44-55.png
     
  6. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    @joejo I sent you a PM with the project attached.

    Any questions please ask. Regards.
     
  7. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    Adrian-Anta likes this.
  8. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    @Tanya_Li @joejo I downloaded 2019.4.20f1 today, made a build and this issue is still there.
     
  9. Adrian-Anta

    Adrian-Anta

    Joined:
    Oct 26, 2012
    Posts:
    35
    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.

    upload_2021-2-11_11-34-10.png
     
  10. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    Hey,

    I will investigate it. Will keep you updated.

    Thanks,
    Tanya
     
  11. Timboc

    Timboc

    Joined:
    Jun 22, 2015
    Posts:
    238
    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.
     
    Last edited: Feb 12, 2021
  12. Drumsmasher17

    Drumsmasher17

    Joined:
    Jun 3, 2015
    Posts:
    7
    Also wanted to chime in to say we've got the same issue on our VR app.

    It wasn't an issue when we were on 2019.3.4f1
     
  13. Tanya_Li

    Tanya_Li

    Unity Technologies

    Joined:
    Jun 29, 2020
    Posts:
    105
    @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!
     
  14. Fiedel

    Fiedel

    Joined:
    Mar 7, 2017
    Posts:
    4
    @Tanya_Li, thanks, in Unity 2019.4.25 the player window is rendered correctly after resizing.
    However, it flickers during the resizing.
     
    Norair1997 likes this.