cancel
Showing results for 
Search instead for 
Did you mean: 

GearVR Back Button Callbacks in Unity are deprecated?

AJCMPC
Honored Guest
A month ago, I installed the Oculus-provided OVRPlatformMenu.cs script into my scene and slightly modified it to suit my purposes. This was required by Oculus' review team in order to pass submission for a GearVR app built with Unity 5.5. Without it, the reserved interactions for the GearVR Back Button were not functioning properly. I installed the latest Oculus Utilities and the latest Platform SDK just before tackling this problem.

I had assumed the Oculus Universal Menu and Back-to-Home menus would be provided and controlled by the Oculus app without any intervention from us, but apparently Oculus wanted us to install their Platform SDK code into our app to manage the back button functionality instead. So I did, and then the app was accepted into the store.

Today, I've been rejected again by the Oculus review team for a different GearVR app because suddenly the same back button functionality doesn't work yet again, even though I'm using the SAME OCULUS-PROVIDED CODE I used last month.  OVRPlatformMenu.cs is now apparently broken.

It appears that now the Oculus app does handle the Universal Menu on Long-Back-Button-Press on its own. I commented out all the Oculus code I was using to manage that, and the menu fires anyway on Long-Press. I also tested the LONG_PRESS callback provided by Oculus in OVRPlatformMenu.cs. It still fires, but only sometimes.

If you use the code they provide in OVRPlatformMenu.cs, you'll often call the Universal menu twice at the same time. If there's any callback for Long_Press that works 100% of the time, I don't know where to find documentation for it. The docs that specify how it once worked are here: https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-utilities-overview/#u... ... the relevant section is now marked DEPRECATED.

This deprecation happened some time over the past month, and I don't know how my team and I could ever have known to prepare for it. This is a little alarming. All currently deployed apps that contained this code would be suddenly broken. Other distribution platforms provide detailed deprecation schedules for exactly this sort of thing. End users get very mad when an app is working for a while and then it is suddenly and inexplicably broken.

1) How do I get a callback when the user executes a GearVR Back-Button-Long-Press in Unity? If the old way to do this is deprecated, what's the new way?

2) Is there a deprecation schedule for either the Oculus Unity Utilities or the Platform SDK? If so, where is it?

If not, please Oculus, please provide a deprecation schedule so that we have some time to prevent our apps from suddenly breaking without warning.
4 REPLIES 4

AJCMPC
Honored Guest
I appreciate your quick reply.  In the Oculus Unity SampleFramework download (https://developer3.oculus.com/documentation/game-engines/latest/concepts/unity-sample-framework/),

I found OVRPlatformMenu.cs in Assets/OVR/Scripts/OVRPlatformMenu.cs. The one I'm currently using was downloaded on 12/16/2016. I modified it slightly just to override the short press mapping to Back-To-Home under certain conditions.

Other than that, the script is verbatim from the sample. I also commented out all my changes last night to test the script in its default state. I found that the callback for short press currently fires 100% of the time, and the callback for long press fires about 50% of the time. This prevents us from satisfying reserved interactions for the Universal Menu.

If you have an updated version of this script that works 100% of the time for both of those callbacks, I would very much appreciate having access to that. I'm looking to resubmit this app for review today if possible.

I hope the documentation will also be updated soon? I see the framework from which I got this script is now deprecated, but that being the case, there doesn't appear to be any specified way to satisfy your reserved interaction requirements via Unity, unless I've overlooked some new doc.

It seems like every Unity developer submitting a GearVR app to you (or updating one) would be rejected because of this. Other platforms provide several months of deprecation warning so that we have time to prevent breaking changes in our apps. If my team had released a dozen GearVR apps so far, they would all have become broken overnight. That's quite a large liability for us, and we have no control to fix it on our end. A deprecation schedule would solve this.

vakomsdev
Honored Guest


OK great---

Here is more information on mobile development reserved interactions right here.

The documentation is currently being overhauled at this time to reflect changes on our platform and those of engine integrations we currently support. In the near future the whole developer documentation database will be searchable, too.

I will private message you the link and explanation for implementing the fixed OVRPlatformMenu.cs script.








Hello,im suffering same problem
Unity 5.5.03f.Oculus utilities 1.10.0.
whole new scene.added a OVRPlatform Menu script to gameobject.
when i go to Global menu and then press back (short press) -> it takes me to Confirm Quit menu.but should go to my app
I was rejected to submit my app because of this 😞

AJCMPC
Honored Guest
@imperativity Thank you for the script. I installed it a few hours ago, but I had to debug it to get it working. The Universal Menu now works as desired, but now the ShowConfirmQuitMenu() function never gets called on short press. I installed your script with no changes as a first test. I confirmed that your HandleBackButtonState() function works, but your DoHandler call fails to fire ShowConfirmQuitMenu() when it should. I fixed it by hard-coding DoHandler's input parameter to eHandler.ShowConfirmQuit.

I had to redeploy this app 30 times just to identify all ins and outs of this issue. As long as there continues to be no deprecation schedule, Oculus developers need to anticipate that breaking changes might fall into their laps at any moment. Please, please relay my passionate vote for a deprecation schedule to the powers that be.

vakomsdev
Honored Guest

AJCMPC said:

@imperativity Thank you for the script. I installed it a few hours ago, but I had to debug it to get it working. The Universal Menu now works as desired, but now the ShowConfirmQuitMenu() function never gets called on short press. I installed your script with no changes as a first test. I confirmed that your HandleBackButtonState() function works, but your DoHandler call fails to fire ShowConfirmQuitMenu() when it should. I fixed it by hard-coding DoHandler's input parameter to eHandler.ShowConfirmQuit.

I had to redeploy this app 30 times just to identify all ins and outs of this issue. As long as there continues to be no deprecation schedule, Oculus developers need to anticipate that breaking changes might fall into their laps at any moment. Please, please relay my passionate vote for a deprecation schedule to the powers that be.


can you help me wi that part?