I have a simple code for the XR Toolkit.
- When I right-click with the mouse, the menu toggles on and off just fine.
- When I press the Oculus controller button, it only works once and then stops responding.
I also tried using the mapping method from Valen’s tutorial on YouTube, but the response was the same—only working once.
I even removed the menu toggling code and left just the Debug.Log() statement, but it still only fires once.
Does anyone have any idea why this is happening or how I can fix it? I would really appreciate any help!
void Update()
{
if (Input.GetButtonDown("Fire2"))
{
// Toggle the in-game menu
menuInGame.SetActive(!menuInGame.activeSelf);
Debug.Log("Fire2 button clicked - toggling menu");
}
}