Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
jkafkaris's avatar
jkafkaris
Explorer
8 years ago

Gear VR Back Button to Confirm Quit Menu

I have found that using OVR Utilities Plugin 1.19 I am able to either add the OVRPlatformMenu script to the scene, or listen for any of these:
if (OVRInput.GetDown(OVRInput.Button.Back) || OVRInput.GetDown(OVRInput.Button.Two) || Input.GetKey(KeyCode.Escape) || Input.GetKeyDown(KeyCode.Escape)) {
OVRManager.PlatformUIConfirmQuit();
}
I am able to get to the "Conform Quit" menu.

As soon at I have updated to 1.23 or even 1.24, this breaks. I notice if I simply place "OVRManager.PlatformUIConfirmQuit();" in the Update method I instantly get the "Confirm Quit" menu, so can confirm that code works, and if I mash the back button on the Gear VR it sometimes goes to the menu, which is very strange.

If I choose "Disable OVR Utilites Plugin" in Unity and return to 1.19 it works perfectly again.

Is this a known bug or am I using an out of date way of accessing the menu or tracking the back button is being pressed?

I am using Unity 2013.3.0f3

Thanks.

8 Replies

Replies have been turned off for this discussion
  • Just want to second this as I have just updated to Oculus Utilities v1.24 (Unity v2017.2.0f3) and this functionality has stopped working.
  • @imperativity Thanks for the confirmation of the issue. I'll keep track for the fix.

  • [Edit] Thought I found a workaround but it was not so.


  • Anonymous's avatar
    Anonymous
    Approved
    I assume this bug is still in 1.25.1?
  • Anonymous's avatar
    Anonymous
    Approved
    @imperativity
    What is the proper way of installing 1.25+ OVR Utilities plug-ins? I noticed it is installing into Oculus/VR/Plugins instead of Plugins/OVR/Plugins and the Tools -> Oculus -> Update OVR Utilities Plugin command is not recognizing 1.25.1 properly (since the version is not installed under Plugins/OVR/Plugins ?).

    What am I supposed to delete before a fresh reinstall? I am using Unity 5.6.5p4 as recommended.
  • I have the same problem. I just can't seem to get an OVR folder to install?
  • drash's avatar
    drash
    Heroic Explorer
    The way I update Utils is the following, always works great for me:

    1) Create new empty Unity project specifically for unpacking new Utils package
    2) Import new Utils package into that new project, accept the prompt to use the newer plugin, allow restart, etc
    3) Close Unity

    3B) Optional: Run a diff (using your favorite merge tool) between old and new Utils to study what's changed in case of any of it impacts your project.

    4) Ensure your own project is backed up
    5) Delete Assets/OVR folder in your own project (or Assets/Oculus as of Utils 1.25)
    6) Copy the Oculus folder in the test project from step 1 into your own project's Assets folder.
    7) Reopen your project and you're good to go.

    Hope that helps!
  • Just to follow up on my inability to get an OVR folder to install ...

    Thanks to drash, above! Step 5 was the key for me. Since I am using version 1.25 of the Utilities, there is no longer an Assets/OVR folder. It is now an Assets/Oculus folder. I had been extremely confused, because I had been trying to follow other Oculus documentation, which referred to earlier releases of the utilities and the original folder structure. I really appreciate you taking the time to respond! Cheers!