MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
411 stars 111 forks source link

Mirroring VR view on Desktop is not working in URP Build #232

Closed IssueSyncBot closed 1 year ago

IssueSyncBot commented 1 year ago

Original issue opened by:

@J4CO3 J4CO3


Describe the bug

Mirroring VR to Desktop does not work in Universal Render Pipeline build. Only black screen without Unity loading logo appears. Mirroring works without issues in editor game view and in builds from the MRTKDevTemplate Unity Project that is not URP. Tested with HP Reverb G2 and Oculus Rift.

To reproduce

  1. Create a new Unity project from the 3D (URP) Core template
  2. Import all MRTK 3 features + Mixed Reality Open XR plugin via latest Mixed Reality Feature tool
  3. Activate Open XR plugin in XR Management
  4. Activate WMR Feature Group + Fix "Run in Background" issue in Project Validation
  5. Add Interaction Profiles
  6. Assign default MRTK Profile in MRTK3 Project Settings
  7. Put MRTK XR Rig into scene
  8. Build standalone

Expected behavior

VR view would be mirrored onto desktop screen.

Your setup (please complete the following information)

Target platform (please complete the following information)


ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/11205

IssueSyncBot commented 1 year ago

Original comment by:

@Daniel4144 Daniel4144


I think I ran into the same problem - for me the culprit was the latest OpenXR Plugin 1.5.3 package. Reverting to 1.4.2 solved the problem for me.

In just noticed that the latest Mixed Reality OpenXR Plugin 1.6.0 has OpenXR Plugin 1.5.3 as dependency, so if you have that installed you also have to revert that to an older version or it will override OpenXR Plugin with the problematic version (Mixed Reality OpenXR Plugin 1.5.1 still worked for me).

IssueSyncBot commented 1 year ago

Original comment by:

@KBonds KBonds


@J4CO3, this seems to be a known Unity issue occurring when the "run in background" option in the project settings is set to false. In versions of the MR OpenXR Plugin before 1.6.0, this was the recommendation of the validator.

For more information, here's a thread discussing what appears to be the same issue you're seeing (example #.2 in this list) https://github.com/microsoft/OpenXR-Unity-MixedReality-Samples/issues/107#issuecomment-1304292396

If you enable the "run in background" option (or run the validator with MR OpenXR Plugin version 1.6.0+), does this resolve your issue?

IssueSyncBot commented 1 year ago

Original comment by:

@J4CO3 J4CO3


@Daniel4144, Thank you. Reverting to Mixed Reality OpenXR Plugin 1.5.1 using the Mixed Reality Feature tool and making sure that OpenXR Plugin 1.4.2 is used resolved this issue.

@KBonds, Fixing "Run in Background" in Project Validation for MR OpenXR Plugin version 1.6.0 doesn't resolve this issue in my case. I have also tried changing the focus of the running app using the Win+Y, but that doesn't make it work either.

IssueSyncBot commented 1 year ago

Original comment by:

@keveleigh keveleigh


Looks like this might be fixed in Unity's latest release!

image