private bool IsBeingClickedBySubmit() { return(EventSystem.current != null && EventSystem.current.currentSelectedGameObject != m_selectable.gameObject && InputDeviceManager.instance != null && InputDeviceManager.IsButtonDown(InputDeviceManager.instance.submitButton)); }
void Update() { if (Input.GetKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && InputDeviceManager.IsButtonDown(buttonName))) { ExecuteEvents.Execute(m_selectable.gameObject, new PointerEventData(EventSystem.current), ExecuteEvents.submitHandler); } }
private void Update() { if (InputDeviceManager.IsButtonDown(menuInputButton)) { ToggleMenu(); } }
private void Update() { if (InputDeviceManager.IsKeyDown(key) || (!string.IsNullOrEmpty(buttonName) && InputDeviceManager.IsButtonDown(buttonName)) || (anyKeyOrButton && InputDeviceManager.IsAnyKeyDown())) { if (skipIfBeingClickedBySubmit && IsBeingClickedBySubmit()) { return; } ExecuteEvents.Execute(m_selectable.gameObject, new PointerEventData(EventSystem.current), ExecuteEvents.submitHandler); } }