Accessing menuButton on Oculus Quest 2

Hey!

I’m building a game for Oculus Quest 2, I’m using the new input system and the Grip and Trigger are working great.

Now I’m trying to access the menuButton on the left controller with no luck.

That’s the schema

7464365--916553--upload_2021-9-1_2-36-46.png

and the code for PauseMenu

using UnityEngine;
using UnityEngine.InputSystem;

namespace Game
{
    public class PauseMenu : MonoBehaviour
    {
        [SerializeField] private InputActionReference menuInputActionReference;

        private void OnEnable()
        {
            menuInputActionReference.action.started += MenuPressed;
        }

        private void OnDisable()
        {
            menuInputActionReference.action.started -= MenuPressed;

        }

        private void MenuPressed(InputAction.CallbackContext context)
        {
            Debug.Log("MenuPressed!");
        }
    }
}

The log message “MenuPressed” never appears, am I doing something wrong?

I’m using XR Interaction Toolkit Version 1.0.0-pre.3

Thanks!

Try using “start” instead of “menuButton”, in the Input system.

Thanks! it worked!

I’ve tried this same set up but am unable to get the menuButton to work on the Quest 2. It runs fine through PCVR but when I build it’s not recognizing the menu button. I’ve tried both menuButton and Start but no luck, any ideas?

Could you elaborate on how you’re checking the device? New Input has a lot of ways to do it.

1 Like

Sorry for late reply, my notifications were off. I made a new action for XRI Left Hand called Toggle. It’s checking for menuButton[LeftHand XR Controller] (this one only works on PCVR not when it’s built on Quest) and then I have secondaryButton [LeftHand XR Controller] (this is my temp solution until I get the menu button to work).

I hope that makes sense

Hey, this button in the Oculus left controller is the start button.
Have you tried the following bind path for Quest: {LeftHand}/start
It’ll show up as: start [LeftHand XR Controller]

3 Likes

I’ll have to double check, I swear I did. Have you tried this on a build for the Quest standalone?

Yeah, I did a build with this configuration for Quest 2 and it worked fine.

1 Like

I’m not sure why but I am not seeing that option here. Even when I go through all of the XR Controller Left Hand options, I don’t see one that says Start. Are you on the most up to date version? 7898494--1006105--upload_2022-2-15_9-44-4.png

The latest version should be fine.
Maybe it’s the selected control scheme (the first toolbar option in the editor action window).
Try to set it to “All Control Schemes”, like in the image.

7918552--1010323--upload_2022-2-22_16-10-8.png

Still no luck on this one :frowning: I’m on all control schemes and don’t see the option sadly

Sorry to hear that. Are you using OpenXR? If this is the case, the binding for this button should be: /menu
8020193--1032824--upload_2022-4-4_13-27-1.png

1 Like

Same same here, I have assigned trigger button and it works, but when assigning menu or menuButton or both together, still cant display menu.

If anyone struggles with this, the quick search does not show all ‘start’ binding paths.

8143616--1057358--problem.gif

But if you step by manually you can find the option.

8143616--1057361--solution.gif

The ‘start’ binding works. It was tested on Quest1 android build. I use the Unity 2021.3.1f1 with these XR packages:
8143616--1057385--upload_2022-5-20_18-10-52.png

1 Like

Weird I followed your video and didn’t see it but I’m also on 2020.3.16 so maybe that’s why

Hey @LuigiNicastro , I can try to reproduce your issue here, can you please provide your setup? The version of your installed packages and the XR provider(s) (Oculus, OpenXR, etc) your are using.

I’m not him but I can’t find the Start either.

I’m on Unity 2020.3.30f1 and these are the packages being used
8173409--1063835--upload_2022-6-1_12-35-16.png

and these are my interaction profiles
8173409--1063844--upload_2022-6-1_12-36-26.png

PS: I forgot to mention but I’m testing using Vive Focus with HTC Stream mode (runs on pc, streams on headset), but the issue with the Menu button is the same I believe.

8173409--1063835--upload_2022-6-1_12-35-16.png

@GoingS If you’re using Open XR the binding for this button (on the left controller) is /menu

@andersoncc this binding isn’t working. I’m also having this issue. 2021.2.18f1

OpenXR version is 1.3.1, I am testing on an Oculus Quest 2. (Not Oculus Link)

I’ve tried Oculus Touch Controller Menu, OculusTouchController Left Menu, XRController Left Hand Menu, XRController Left Hand MenuButton, XRController Menu, XRController MenuButton, and I don’t have Start button in any menus, even when not using quick search. This code below works if I change the button to the trigger:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class MenuToggle : MonoBehaviour
{
[SerializeField] InputActionAsset inputActions;
InputAction menuToggle;
bool menuActive;
[SerializeField] GameObject menuPanel;

// Start is called before the first frame update
private void Start()
{
var inputActionMap = inputActions.FindActionMap(“XRI LeftHand Interaction”);
menuToggle = inputActionMap.FindAction(“Menu Toggle”);
menuToggle.performed += ToggleMenu;
menuToggle.Enable();
}

public void ToggleMenu(InputAction.CallbackContext context)
{
if (menuActive)
{
menuActive = false;
menuPanel.SetActive(false);
}
else
{
menuActive = true;
menuPanel.SetActive(true);
}
}
}