// ------------------ /// \brief Input.GetButton() replacement. /// /// Returns true when active controller's control with matching GetButton name OR an actual button/axis is pressed. // ------------------ static public bool GetButton(string axisName) { if (ControllerActive()) { bool buttonSupported = false; bool buttonState = ctrl.GetButtonEx(axisName, out buttonSupported); if (buttonSupported) { return(buttonState); } } # if CATCH_UNITY_AXIS_EXCEPTIONS try { # endif return(Input.GetButton(axisName));