ReInputControllerHelperSetUnityJoystickIdFromAnyButtonOrAxisPress Method |
Sets a Unity joystick as the input source of a Joystick.
The first Unity joystick that returns a button or axis press will be assigned to the Joystick.
While no buttons or axes are pressed, this will return False. When a press is detected, it will return True and assign the joystick id.
Namespace: RewiredAssembly: Rewired_Core (in Rewired_Core.dll) Version: 1.0.0+fd80194fe28f6b408ce098e98c53850d307c3a32
Syntaxpublic bool SetUnityJoystickIdFromAnyButtonOrAxisPress(
int joystickId,
float axisThreshold,
bool positiveAxesOnly
)
Parameters
- joystickId Int32
- The id of the Joystick
- axisThreshold Single
- Any axis value below this threshold will be ignored.
- positiveAxesOnly Boolean
- Ignore negative axis values.
Return Value
BooleanTrue if a joystick button was pressed and a joystick id was assigned.
See Also