InputBinding
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
Specifies an alternate Enum.KeyCode for dispatching directionally "backward" inputs to the parent InputAction.
Specifies an alternate Enum.KeyCode for dispatching directionally "down" inputs to the parent InputAction.
Specifies an alternate Enum.KeyCode for dispatching directionally "forward" inputs to the parent InputAction.
Specifies the Enum.KeyCode which triggers the parent InputAction.
Specifies an alternate Enum.KeyCode for dispatching directionally "left" inputs to the parent InputAction.
Numerical value above which to fire an InputAction with a Type of Bool.
Numerical value below which to fire an InputAction with a Type of Bool.
Specifies an alternate Enum.KeyCode for dispatching directionally "right" inputs to the parent InputAction.
Amount by which to linearly scale the values of a directional InputAction.
Connects a GuiButton to a boolean action.
Specifies an alternate Enum.KeyCode for dispatching directionally "up" inputs to the parent InputAction.
Amount by which to linearly scale the values of a two-directional InputAction.
Properties
Backward
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.
Down
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.
Forward
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.
KeyCode
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.
Left
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
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
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.
Right
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
Amount by which to linearly scale the values of an InputAction with Type of Direction1D, Direction2D, or Direction3D.
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.
Vector2Scale
Amount by which to linearly scale the values of an InputAction with Type of Direction2D.