InputBinding
Defines which hardware binding should trigger the parent InputAction.
| Memory category | Instances |
|---|
Member index 19
Description
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.
History 45
- 726 Change Default of Vector3Scale from Vector3(1, 1, 1) to
- 726 Change Default of Vector2Scale from Vector2(1, 1) to
- 726 Change Default of Up from Unknown to
- 726 Change Default of UIModifier from to
- 726 Change Default of UIButton from to
- 726 Change Default of SecondaryModifier from Unknown to
- 726 Change Default of Scale from 1 to
- 726 Change Default of Right from Unknown to
- 726 Change Default of ResponseCurve from 1 to
- 726 Change Default of ReleasedThreshold from 0.200000003 to
- 726 Change Default of PrimaryModifier from Unknown to
- 726 Change Default of PressedThreshold from 0.5 to
- 726 Change Default of PointerIndex from 0 to
- 726 Change Default of Left from Unknown to
- 726 Change Default of KeyCode from Unknown to
- 726 Change Default of Forward from Unknown to
- 726 Change Default of Down from Unknown to
- 726 Change Default of ClampMagnitudeToOne from true to
- 726 Change Default of Backward from Unknown to
- 722 Add UIModifier
- 709 Add ClampMagnitudeToOne
- 703 Add SecondaryModifier
- 703 Add PrimaryModifier
- 702 Add PointerIndex
- 701 Remove PointerIndex
- 702 Add PointerIndex
- 701 Add Vector3Scale
- 687 Add ResponseCurve
- 687 Change Tags of InputBinding from [NotBrowsable] to []
- 677 Add Forward
- 677 Add Backward
- 667 Add Vector2Scale
- 667 Add Up
- 667 Change Category of Scale from Data to Behavior
- 667 Add Right
- 667 Add Left
- 667 Add Down
- 665 Add Scale
- 665 Add ReleasedThreshold
- 665 Add PressedThreshold
- 663 Change Category of UIButton from Data to Behavior
- 663 Change Category of KeyCode from Data to Behavior
- 661 Add UIButton
- 661 Add KeyCode
- 661 Add InputBinding
Members 19
Backward
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
ClampMagnitudeToOne
| Type | Default | |
|---|---|---|
| bool | ||
Determines whether the binding normalizes the combined composite
directional vector to a maximum magnitude of 1 only if it exceeds that
length. This prevents diagonal composite inputs (for example
Up and Right pressed
simultaneously) from producing a magnitude greater than 1, ensuring
consistent movement speed regardless of the keys held. Default is true.
This property only applies when the parent action's Type is Direction1D, Direction2D, or Direction3D.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
History 2
- 726 Change Default of ClampMagnitudeToOne from true to
- 709 Add ClampMagnitudeToOne
Down
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
Forward
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
KeyCode
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies the KeyCode which triggers the parent InputAction. The code type should match the input action's Type, for example KeyCode.E for an action type of Bool or 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
Left
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
PointerIndex
| Type | Default | |
|---|---|---|
| int | ||
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 4
- 726 Change Default of PointerIndex from 0 to
- 702 Add PointerIndex
- 701 Remove PointerIndex
- 702 Add PointerIndex
PressedThreshold
| Type | Default | |
|---|---|---|
| float | ||
Numerical value above which to fire an InputAction with a
Type of Bool, for example
when a gamepad trigger such as 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of PressedThreshold from 0.5 to
- 665 Add PressedThreshold
PrimaryModifier
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies a KeyCode that serves as a required modifier for the binding. The InputBinding will only trigger the parent InputAction if this input is pressed prior to KeyCode, UIButton, or composite directions.
There is no ordering requirement between PrimaryModifier and SecondaryModifier. If both properties are set, both modifiers must be pressed to activate the binding, but the order in which they are pressed does not matter.
If set to KeyCode.Unknown, no primary modifier is required.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of PrimaryModifier from Unknown to
- 703 Add PrimaryModifier
ReleasedThreshold
| Type | Default | |
|---|---|---|
| float | ||
Numerical value below which to fire an InputAction with a
Type of Bool, for example
when a gamepad trigger such as 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of ReleasedThreshold from 0.200000003 to
- 665 Add ReleasedThreshold
ResponseCurve
| Type | Default | |
|---|---|---|
| float | ||
A numerical value to control the sensitivity of gamepad thumbstick input by applying a quadratic response curve. Commonly used for camera control to make small thumbstick inputs more precise, while ramping up quickly to allow for large movements with higher magnitude input.
Ranges between 1 to 10, with higher values providing a more intense
curve. Default is 1, at which input is returned exactly as received.
Only applicable when the parent action's Type is Direction2D and the KeyCode is Thumbstick1 or Thumbstick2.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of ResponseCurve from 1 to
- 687 Add ResponseCurve
Right
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
Scale
| Type | Default | |
|---|---|---|
| float | ||
A scalar multiplier applied uniformly to every component of the output value. Applies to InputAction types Direction1D, Direction2D, and Direction3D.
To scale individual components independently, use
Vector2Scale (for
Direction2D) or
Vector3Scale (for
Direction3D). When both Scale and a vector scale
are set, both are applied.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
SecondaryModifier
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies a KeyCode that serves as a required modifier for the binding. The InputBinding will only trigger the parent InputAction if this input is pressed prior to KeyCode, UIButton, or composite directions.
There is no ordering requirement between PrimaryModifier and SecondaryModifier. If both properties are set, both modifiers must be pressed to activate the binding, but the order in which they are pressed does not matter.
If set to KeyCode.Unknown, no secondary modifier is required.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of SecondaryModifier from Unknown to
- 703 Add SecondaryModifier
UIButton
| Type | Default | |
|---|---|---|
| GuiButton | ||
GuiButton to connect to a boolean action.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
UIModifier
| Type | Default | |
|---|---|---|
| GuiButton | ||
Specifies a GuiButton that must be pressed for the InputBinding to trigger the parent InputAction. Behaves similarly to PrimaryModifier and SecondaryModifier, but accepts a UI button reference rather than a KeyCode.
If nil, no modifier is required.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of UIModifier from to
- 722 Add UIModifier
Up
| Type | Default | |
|---|---|---|
| KeyCode | ||
Specifies an alternate 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.
| Thread safety | ReadSafe |
|---|---|
| Category | Composite Directions |
| Loaded/Saved | true |
Vector2Scale
| Type | Default | |
|---|---|---|
| Vector2 | ||
Amount by which each component of the output is independently linearly scaled. Only applies when the parent action's Type is Direction2D.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of Vector2Scale from Vector2(1, 1) to
- 667 Add Vector2Scale
Vector3Scale
| Type | Default | |
|---|---|---|
| Vector3 | ||
Amount by which each component of the output is independently linearly scaled. Only applies when the parent action's Type is Direction3D.
| Thread safety | ReadSafe |
|---|---|
| Category | Behavior |
| Loaded/Saved | true |
History 2
- 726 Change Default of Vector3Scale from Vector3(1, 1, 1) to
- 701 Add Vector3Scale