Forum Discussion
Anonymous
9 years agoNot applicable
[SOLVED] Click events fired twice on Gear VR
Hello, I am having a strange problem since the latest Oculus/GearVR update (not sure which one it was :blush: ). When I click on a button in Editor it works as expected, same when running the app in d...
SerFreeman
9 years agoHonored Guest
I had the same problem. I don't know what is official solution but you can try mine which works in my case.
Go to OVRInputModule.cs script and change this method.
Go to OVRInputModule.cs script and change this method.
virtual protected PointerEventData.FramePressState GetGazeButtonState()
{
//var pressed = Input.GetKeyDown(gazeClickKey) || OVRInput.GetDown(joyPadClickButton);
//var released = Input.GetKeyUp(gazeClickKey) || OVRInput.GetUp(joyPadClickButton);
//#if UNITY_ANDROID && !UNITY_EDITOR
// // On Gear VR the mouse button events correspond to touch pad events. We only use these as gaze pointer clicks
// // on Gear VR because on PC the mouse clicks are used for actual mouse pointer interactions.
// pressed |= Input.GetMouseButtonDown(0);
// released |= Input.GetMouseButtonUp(0);
//#endif
var pressed = Input.GetMouseButtonDown(0);
var released = Input.GetMouseButtonUp(0);
if (pressed && released)
return PointerEventData.FramePressState.PressedAndReleased;
if (pressed)
return PointerEventData.FramePressState.Pressed;
if (released)
return PointerEventData.FramePressState.Released;
return PointerEventData.FramePressState.NotChanged;
}Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 month ago
- 1 year ago