Class InputHelpers
Helper class for different kinds of input.
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
public static class InputHelpers : object
Methods
IsPressed(InputDevice, InputHelpers.Button, out Boolean, Single)
Checks whether button is pressed or not.
Declaration
public static bool IsPressed(this InputDevice device, InputHelpers.Button button, out bool isPressed, float pressThreshold = null)
Parameters
| Type | Name | Description |
|---|---|---|
| InputDevice | device | The input device. |
| InputHelpers.Button | button | The button that is being checked. |
| Boolean | isPressed | A boolean that will be true if button is pressed and false if not. |
| Single | pressThreshold | The threshold of what defines a press. |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if device and button are valid. Otherwise, returns false. |