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

Changing Scene Leads to XrState Normal #380

Closed Gianlucccc closed 3 months ago

Gianlucccc commented 3 months ago

Describe the bug When switching from scene A to Scene B, webxr instance persist for a second before getting kicked out and Xr State is Changed to Normal

To Reproduce Steps to reproduce the behavior:

  1. create two scene
  2. make webxr setup dontdestroy on load
  3. launch scene a
  4. Switch to scene b
  5. you get kicked out of xr session

Expected behavior Switching seamlessly between scenes

Unity info (please complete the following information):

Headset (please complete the following information):

Additional context Add any other context about the problem here.

De-Panther commented 3 months ago

What is that bridge you mentioned? I see that you are using the 0.18.0 packages, does it happen in 0.22.0 as well? (I remember fixing related issues in the past, don't remember which version)

Gianlucccc commented 3 months ago

this is the package i used https://github.com/someone-s/webxr-xri-toolkit-bridge

we tried to upgrade to 0.22.0 but we have plenty of errors, i dont know if we can afford to upgrade, but if you tell me that i should, i will try

De-Panther commented 3 months ago

Can you try creating a new project with up to date package and 2 scenes and see if it works?

(I recommend using BiRP and disabling the Display subsystem in the WebXR settings)

Gianlucccc commented 3 months ago

I will try monday, now im upgrading to 0.22.0 and see what happens, the errors were actually related to the bridge of someone-s that referred to events you probably renamed ( one was onheadsetsomething ) , so i removed it from project

De-Panther commented 3 months ago

I wanted to save you the need of upgrading the project.

If you do upgrade, you'll need to update the XR Rig as well. Load one of the newer samples and use a rig from there. (The URP samples use Display Subsystem, the BiRP doesn't)

Gianlucccc commented 3 months ago

thanks my man, lemme say first thank you for your work, this repo is pure gold.

so i managed to upgrade really quick tbh, ofc without some messed up stuff.

can you point me to the new xr rig you are referring to ? my headset tracking seems inverted and stuck to floor level at the moment

De-Panther commented 3 months ago

As I mentioned, load a relevant sample. You can load the samples from the WebXR Interactions package window. There are a few getting started guides, including the text based ones in this repo, that explains this.

Gianlucccc commented 3 months ago

will do thanks. lemme update you on monday. G*d bless you

Gianlucccc commented 3 months ago

Goodmorning my friend. i made a supersimple setup as you said, and it works like a charm. i gotta say 0.22 is so far beyond in quality to 0.18, the interactions you configured are way better than the framework we are currently using. i will upgrade everything and refactor to support 0.22

thank you so much for your work G*d bless you