Skip to main content
New Participant
August 12, 2021
Solved

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!

This topic has been closed for replies.
Answer
March 11, 2022

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 

7 replies

New Participant
August 14, 2021

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.

Inspiring
January 19, 2022

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. 

New Participant
February 23, 2022

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.

Up and Coming
January 24, 2022

I am experiencing the same bug.

 

With OpenXR, OVRPlugin.userPresent ALWAYS returns true.

Answer
March 11, 2022

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 

New Participant
March 14, 2022

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!

March 18, 2022

hahahaha, you are welcome!