cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus Go back button randomly detected

KosTargo
Honored Guest
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 ?
23 REPLIES 23

MikeSwanson
Protege
Dropping by to say that today's 1.34.0 release today does not fix this issue.

cenek.strichel
Honored Guest
I had same problem, but I fixed it! 🙂 I have two projects with same SDK. One with problem, second without problem. So it must be fixed in some Unity settings. I set my project settings by this blog: https://developer.oculus.com/blog/tech-note-unity-settings-for-mobile-vr/ and Back button is working again! I don't know what parameter affect back button, but maybe it is multithread rendering as @lindahao mentioned. 

MikeSwanson
Protege
FYI that yesterday's Oculus Integration 1.35.0 release mostly fixes this back button issue (without changing any project settings).

If you press the back button less than once every 1/3 of a second (or so), it'll reliably detect every button press.

If you press it faster than that, it will still drop events.

For our use case, this is basically fixed.

Anonymous
Not applicable
To solve the back button behavior to pass the store, I used a custom behavior.  The default will minimize your app and use the Oculus implementation, which I don't think passes the technical review. With the custom dropdown selected you can script your own button behavior, I just used the setTextandNext -> fadeAndLoadScene method to get the behavior I wanted.  You might be able to do it similarly, hope this helps!61e75ailm65t.jpg