cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Quest with Unity: HMD Mount/Unmount Events not being fired

I have events that are meant to fire specifically when the Quest is put on/taken off. These have worked perfectly up until I upgraded the Oculus Integration to 31.0 (worked fine with Oculus Integration 29.0 with Unity 2021.1.10f1)

 

Root cause [as far as I can see] is that the boolean at OVRPlugin.userPresent is not updated properly.

 

Also, to be perfectly accurate: They fire once when the app is opened, then again when the app is closed or the headset goes into standby (pressing the power button, for example), but not when the

 

Current versions:

Unity 2021.1.16f1

Oculus Integration Version 31.0

Running on a Quest V1, v31.1.0.102.370.308659911

 

Anyone else experiencing this?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

SirMazius
Explorer

Hello we had this same issue, apparently using Oculus OpenXR backend has a bug affecting the mount/unmount events. Updating to the new version of the unity plugin should solve the problem. Here is the change log from oculus. Oculus Changelog 

imagen.png

View solution in original post

7 REPLIES 7

I found switching to the "Legacy OVRPlugin" makes it work again.

For reference: Menu bar: Oculus > Tools > OpenXR > Switch to Legacy OVRPlugin (with LibOVR VRAPI backends)

So perhaps I need to see what OpenXR fires for this event? I distinctly feel like I am missing something.

Hello, did you manage to get this resolved on OpenXR? I'm actually having the same problem and will be looking for a fix. One thing that I noticed is that my headset doesn't seem to go to sleep in any game when I take it off. Have tried a couple of random games including beat saber. It does, however, go to sleep in the quest home. 

Heaney-555
Heroic Explorer

I am experiencing the same bug.

 

With OpenXR, OVRPlugin.userPresent ALWAYS returns true.

Issue persists, last I checked. I expect it means I will need to figure out how to get the equivalent of OVRPlugin.userPresent from OpenXR. No time for that right now, though. Using the legacy plugin (no OpenXR) works for my purposes.

I had not considered other apps, but that would definitely make sense.

SirMazius
Explorer

Hello we had this same issue, apparently using Oculus OpenXR backend has a bug affecting the mount/unmount events. Updating to the new version of the unity plugin should solve the problem. Here is the change log from oculus. Oculus Changelog 

imagen.png

Yes! It was a bug the entire time! Who would've guessed? Not I! Not I, for sure. It indeed works now, in the editor and in builds. Thanks!

hahahaha, you are welcome!