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.04k stars 110 forks source link

Build not running in Chrome #270

Closed alexey7783 closed 1 year ago

alexey7783 commented 1 year ago

Good day,

I followed the documentation and created a build. But the VR mode ist not working, and this is the error I get in the Chrome`s console:

WebGL: INVALID_FRAMEBUFFER_OPERATION: drawElements: Cannot render to a XRWebGLLayer framebuffer outside of an XRSession animation frame callback.

What am I missing?

Thanks for your help

De-Panther commented 1 year ago

🤷‍♂️ Please add more details. VR device? OS? Chrome version? OpenXR runtime? Unity version? Color space? Graphics APIs? Did you follow all the steps in getting started? Other important details? And define "not working".

alexey7783 commented 1 year ago

Hi Panther, thanks for your quick respone:

Let me gather the infos:

VR device: Rift S (your demo scene works with it) OS: Windows11 Chrome version: 113.0.5672.93 OpenXR runtime: not sure where to get this info from. I didnt install the OpenXR plugin in Unity, if you are asking this Unity version: 2021.3.8.f1 Color space: linear Graphics API: WebGL2 Did I follow all steps: yes, just checked it again. I am for example using the WebXR2020 template Other details: I installed the app on my web server and disabled the compression under the "player>publishing" tab, because my server doesnt allow for compressed builds.

Here the URL, so you can test yourself: https://vrinsight.de/webvr/WebXRTest/index.html

When starting the camera is rendered in the browser. Clicking on "VR" doesn`t change into VR mode like you desert sample.

Thank you once again

alexey7783 commented 1 year ago

Ah another info: I found out that it is working on my Quest 2! So your sample scene works on my Rift S and my Quest 2, my build only on the Quest 2

De-Panther commented 1 year ago

OpenXR runtime?(e.g. SteamVR OpenXR runtime, or Oculus OpenXR runtime... it's not related to Unity) Color space? Graphics APIs? Did you follow all the steps in getting started? (e.g. you build the sample and it worked)

By your last reply, my guess it's related to cache. try empty the history on your desktop chrome.

alexey7783 commented 1 year ago

Oh I just saw my answer was strangly formated and the answers to your questions are not well visible.

So:

OpenXR runtime was on Oculus, didn't work. I switched to SteamVR, now it works

Color space: lineae Graphics API: WebGL2

So I conclude: Quest 2 working, PCVR with SteamVR as OpenXR runtime works, but not with Oculus (and Rift S as headset at least)

De-Panther commented 1 year ago

You can try to update your Oculus Desktop app (maybe use beta) and switch back to Oculus OpenXR runtime. It still looks like cache issue to me, and not OpenXR runtime issue. Update if it still happens once you switched back to Oculus OpenXR runtime.

Anyway, it doesn't seems like it's related to the WebXR Export package.

alexey7783 commented 1 year ago

Thank you for the feedback. I already cleared the browser cache a few times, there is no difference. Nevertheless I got it running now via SteamVR, thank you once again.

De-Panther commented 1 year ago

Well, maybe an issue of the Oculus OpenXR runtime when using Rift S 🤷‍♂️