Click or drag to resize

ReInputControllerHelperGetUnityJoystickIdFromAnyButtonOrAxisPress Method

Returns the 0 based id of the Unity joystick whose button or axis was pressed. -1 if no button or axis was pressed on any joystick. Use this to identify joysticks when using Unity's input system. This has no effect if Unity Input is not handling input on the current platform.

Namespace: Rewired
Assembly: Rewired_Core (in Rewired_Core.dll) Version: 1.0.0+20d1932ee9c49d9b6496f76a0835fd9b82311ad2
Syntax
C#
public int GetUnityJoystickIdFromAnyButtonOrAxisPress(
	float axisThreshold,
	bool positiveAxesOnly
)

Parameters

axisThreshold  Single
Any axis value below this threshold will be ignored.
positiveAxesOnly  Boolean
Ignore negative axis values.

Return Value

Int32
0-based index of the Unity joystick whose button or axis was pressed
See Also