Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Samsung Gear VR - Error on Pressing back button long-press returns the user to Oculus Home

Discussion in 'AR/VR (XR) Discussion' started by Javieret, Aug 3, 2015.

  1. Javieret

    Javieret

    Joined:
    Jul 3, 2015
    Posts:
    8
    Hi,

    Some days ago I tried to upload to Oculus Store, people from Oculus Support tell me that report:

    “The back button long-press returns the user to Oculus Home, instead of the Oculus Universal Menu. Please fix this and let us know when you have resubmitted. ”


    I’m using “Unity 5 VR native” with “OculusUtilities_0_1_0_beta”. I tried to change the line:
    Code (CSharp):
    1. Application.Quit();
    by
    Code (CSharp):
    1. OVRManager.PlatformUIGlobalMenu();
    Full Code:
    Code (CSharp):
    1. //If is a long press
    2.             if (_timeElapsedPressed >= LongPressDuration)
    3.             {
    4.                 //Crashes on Gear VR
    5.                 OVRManager.PlatformUIGlobalMenu();
    6.  
    7.                 //I did this call before
    8.                 //Application.Quit();
    9.             }
    10.             else
    11.             {
    12.                 //Is short press, return to main menu
    13.                 Application.LoadLevel("01 - MainMenu");
    14.             }
    15.  
    But it crashes when I run it on Gear. I don’t know if this crash is for “OculusUtilities_0_1_0_beta” or if I need to add something new to scene.



    Thanks for all
     
    Last edited: Aug 4, 2015
  2. Javieret

    Javieret

    Joined:
    Jul 3, 2015
    Posts:
    8
    Guys, I've just updated from Unity 5.1.1 to 5.1.2 and the problem has been solved. No errors ;)