InputBinding

Show Deprecated
Not Browsable

An InputBinding defines which hardware binding should trigger the parent InputAction, for example a key press, gamepad button, or tap on a touch‑enabled device. There can be multiple InputBinding instances parented to an InputAction.

Summary

Properties

Properties

Backward

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "backward" inputs to GetState() and the StateChanged event of the parent InputAction. Only applies when the parent action's Type is Direction3D, in which case the dispatched value will be a Vector3 with its Z component between 0 and -1.

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "down" inputs to GetState() and the StateChanged event of the parent InputAction.

When the parent action's Type is Direction1D, the dispatched value will be a number between 0 and -1.

When the parent action's Type is Direction2D, the dispatched value will be a Vector2 with its Y component between 0 and -1.

When the parent action's Type is Direction3D, the dispatched value will be a Vector3 with its Y component between 0 and -1.

Not applicable when the parent action's Type is Bool.

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "forward" inputs to GetState() and the StateChanged event of the parent InputAction. Only applies when the parent action's Type is Direction3D, in which case the dispatched value will be a Vector3 with its Z component between 0 and 1.

Read Parallel

Specifies the Enum.KeyCode which triggers the parent InputAction. The code type should match the input action's Type, for example Enum.KeyCode.E for an action type of Bool or Enum.KeyCode.Thumbstick1 for an action type of Direction2D. Type mismatches will either not fire the InputAction or the StateChanged event will receive a converted value.

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "left" inputs to GetState() and the StateChanged event of the parent InputAction.

When the parent action's Type is Direction2D, the dispatched value will be a Vector2 with its X component between 0 and -1.

When the parent action's Type is Direction3D, the dispatched value will be a Vector3 with its X component between 0 and -1.

Not applicable when the parent action's Type is Direction1D or Bool.

PressedThreshold

Read Parallel

Numerical value above which to fire an InputAction with a Type of Bool, for example when a gamepad trigger such as Enum.KeyCode.ButtonL2 exceeds 0.5 (halfway pressed). Default is 0.5.

This property must be greater than or equal to ReleasedThreshold or else it will be clamped to ReleasedThreshold.

ReleasedThreshold

Read Parallel

Numerical value below which to fire an InputAction with a Type of Bool, for example when a gamepad trigger such as Enum.KeyCode.ButtonL2 falls below 0.5 (less than halfway pressed). Default is 0.2.

This property must be less than or equal to PressedThreshold or else it will be clamped to PressedThreshold.

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "right" inputs to GetState() and the StateChanged event of the parent InputAction.

When the parent action's Type is Direction2D, the dispatched value will be a Vector2 with its X component between 0 and 1.

When the parent action's Type is Direction3D, the dispatched value will be a Vector3 with its X component between 0 and 1.

Not applicable when the parent action's Type is Direction1D or Bool.

Scale

Read Parallel

Amount by which to linearly scale the values of an InputAction with Type of Direction1D, Direction2D, or Direction3D.

UIButton

Read Parallel

GuiButton to connect to a boolean action.

Read Parallel

Specifies an alternate Enum.KeyCode for dispatching directionally "up" inputs to GetState() and the StateChanged event of the parent InputAction.

When the parent action's Type is Direction1D, the dispatched value will be a number between 0 and 1.

When the parent action's Type is Direction2D, the dispatched value will be a Vector2 with its Y component between 0 and 1.

When the parent action's Type is Direction3D, the dispatched value will be a Vector3 with its Y component between 0 and 1.

Not applicable when the parent action's Type is Bool.

Vector2Scale

Read Parallel

Amount by which to linearly scale the values of an InputAction with Type of Direction2D.

Methods

Events