New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

Oculus Go back button randomly detected

KosTargoKosTargo Posts: 4
NerveGear
Hi,

I'm facing a weird problem with the back button on the Oculus Go.
I'm developing my app with Unity 2018.1.0f2, Oculus SDK 1.25.2 and VRTK 3.3 and my last step to upload my app on oculus store is to make the back button requirement. (Enable Universal Menu when back button is pressed)

Unfortunately, the back button event is catch randomly. I need to spam the button if I want the event called.

I tried different ways :

void Update ()
    {
        OVRInput.Update();
        Debug.Log("Update");
        if (OVRInput.Get(OVRInput.Button.Back))
            OVRPlugin.ShowUI(new OVRPlugin.PlatformUI()); if (OVRInput.GetDown(OVRInput.Button.Back)) OVRPlugin.ShowUI(new OVRPlugin.PlatformUI());
    }
  
 public VRTK_ControllerEvents m_Event;

    private void Start()
    {
        m_Event.ButtonTwoPressed += (sender, e) => { OVRPlugin.ShowUI(new OVRPlugin.PlatformUI()); };
        m_Event.ButtonTwoReleased += (sender, e) => { OVRPlugin.ShowUI(new OVRPlugin.PlatformUI()); };
        m_Event.ButtonTwoTouchStart += (sender, e) => { OVRPlugin.ShowUI(new OVRPlugin.PlatformUI()); };
        m_Event.ButtonTwoTouchEnd += (sender, e) => { OVRPlugin.ShowUI(new OVRPlugin.PlatformUI()); };
    }

But the result is still the same. 

Do I miss something ?

Comments

  • KosTargoKosTargo Posts: 4
    NerveGear
  • imperativityimperativity Posts: 3,465 Oculus Staff
    Hi,

    You are using an OVRManager in your Unity scene right?

    If you are, are you saying that you need to incorporate further logic to detect the button press?
    Please tag me @imperativity in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • juanoldinhojuanoldinho Posts: 131 Oculus Staff
    @KosTargo

    Do you have OVRManager in your scene? If so you do not need to call OVRInput.Update() in the Update() method. That may be why the back button is not getting caught consistently.

    Also the OVRPlatformMenu script provides a short press handler, which can either show the Confirm Quit menu, or retreat one level of your application, until the main scene is reached and it displays the Confirm Quit menu.
    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • juanoldinhojuanoldinho Posts: 131 Oculus Staff
    Also, when you check for the back button you can just check using Get(), then use
    if (OVRInput.Get (OVRInput.Button.Back)) {
    	OVRDebugInfo.print ("pressed back button");
    	OVRManager.PlatformUIConfirmQuit ();
    }


    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • KosTargoKosTargo Posts: 4
    NerveGear
    @imperativity  
    Yes I'm using OVRManager because I'm using the OVRCameraRig prefab.
    I don't understand your second question, all I can say is that nothing works to detect correctly the back button.

    @juanoldinho  
    I know for the OVRInput.Update(), but with or without it, the result is the same. Also for OVRInput.Get...
    Thank you for the OVRPlatformMenu script but the result is still the same. I need to spam the back button and it works 1 on X(random) times.
  • KosTargoKosTargo Posts: 4
    NerveGear
    @juanoldinho
    BTW, even with OVRInput.Button.any, the problem is still here. All the buttons respond correctly but not the back button.
  • imperativityimperativity Posts: 3,465 Oculus Staff
    @KosTargo

    I have confirmed internally that this is an issue that specifically effects Unity 2018.1 can you please update to 2018.2 or later? This issue will be resolved then. 
    Please tag me @imperativity in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • jhone.gjhone.g Posts: 1
    NerveGear
    @imperativity
    I have this problem using Unity 2017.2.4.2f2 and Oculus Utilities 1.22
  • imperativityimperativity Posts: 3,465 Oculus Staff
    @jhone.g

    Can you please upgrade your version of Oculus Utilities?
    Please tag me @imperativity in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • JacobHomanicsJacobHomanics Posts: 7
    NerveGear
    Hi, so I am actually encountering this issue with the latest version Oculus Integration and Unity 2018.2.14f1. It is the exact same issue.
Sign In or Register to comment.