De-Panther / unity-webxr-export

Develop and export WebXR experiences using Unity WebGL
https://de-panther.github.io/unity-webxr-export/
Apache License 2.0
1.01k stars 106 forks source link

Spectator camera doesn't work well with URP material #300

Closed CHRISLAUSC closed 6 months ago

CHRISLAUSC commented 11 months ago

Describe the bug The camera of spectator view appear in the oculus device after convert the pink material to URP.

To Reproduce Steps to reproduce the behavior:

  1. Open a new unity project with 3D URP scene.
  2. Then import all the WEBXR stuffs from OpenURM.
  3. Build and Run.

Expected behavior It seems like you've encountered an issue while building a desert scene in 3D using Universal Render Pipeline (URP) for VR. When you created a simple 3D scene with standard materials, it worked fine. However, when attempting to create a desert scene with URP, the spectator view appear inside in the Oculus device not in the browser.

Screenshots If applicable, add screenshots to help explain your problem.

Spectator camera Settings with URP

Screenshot 2023-07-24 232038

Spectator camera Settings with Standard Material (Working)

Screenshot 2023-07-24 232126

Unity info (please complete the following information):

Desktop (please complete the following information):

Headset (please complete the following information):

Additional context Add any other context about the problem here.

De-Panther commented 6 months ago

Fixed now that we moved to URP only. Apparently the URP uses another method for pre rendering, so instead of OnPreRender() was needed to register to RenderPipelineManager.beginCameraRendering.

Fixed in versions 0.20.0.