MozillaReality / unity-webxr-export

INACTIVE - Assets for creating WebXR-enabled Unity3D projects.
https://mixedreality.mozilla.org/unity-webxr-export/Build/
Apache License 2.0
626 stars 127 forks source link

NullReferenceException WebXRController.cs #414

Closed ws18 closed 4 months ago

ws18 commented 4 years ago

If in any of my Input Map I set GamepadIsButton = false for Inputs other than the default inputs specified in the sample project, I always get a NullReferenceException on WebXRController at line 80. Particularly, I'm trying to set Gamepad ID 3 to be an axis (should be Thumbstick Y) instead of a button. But if I do, I get the error and everything stops working.

Is it a bug or am I doing something horribly wrong?

msub2 commented 4 years ago

Encountering the same issue right now. Did you ever find a fix?

EDIT: After digging around I think it's because it's checking for XRDevice.isPresent, which will return false even if you have a device present. I'm working on a fork that updates some things and switches it to check for XRDisplaySystem.running instead