Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ A [`SlowTapInteraction`](xref:UnityEngine.InputSystem.Interactions.SlowTapIntera

## MultiTap

A [`MultiTapInteraction`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) requires the user to press and release a Control within [`tapTime`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) seconds [`tapCount`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) times, with no more then [`tapDelay`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) seconds passing between taps, for the Interaction to trigger. You can use this to detect double-click or multi-click gestures.
You can use `MultiTap` to detect double-click or multi-click gestures. For a [`MultiTapInteraction`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) to trigger, the user must press a control and release it within [`tapTime`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) seconds, repeating the press-and-release process [`tapCount`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) times. There can't be more than [`tapDelay`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction) seconds between taps.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2

While touching the MultiTap section, the default-value table just below still says tapDelay defaults to 2 * tapTime. The implementation actually falls back to InputSettings.multiTapDelayTime when tapDelay is unset, so this section still documents the wrong default spacing between taps and will mislead anyone tuning multi-click timing. Please update the table row to match the runtime behavior.

🤖 Helpful? 👍/👎

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfreire-unity is u-pr right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, u-pr is right (even though your changes are not affecting it; it just found out another doc inconsistency with the implementation)

@suearkinunity suearkinunity Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check my change, please? I basically copy/pasted u-pr.

aa03598


|__Parameters__|Type|Default value|
|---|---|---|
|[`tapTime`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|`float`|[`InputSettings.defaultTapTime`](xref:UnityEngine.InputSystem.InputSettings)|
|[`tapDelay`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|`float`|2 * [`tapTime`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|
|[`tapDelay`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|`float`| Falls back to `InputSettings.multiTapDelayTime` when `tapDelay` is unset. |
|[`tapCount`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|`int`|2|
|[`pressPoint`](xref:UnityEngine.InputSystem.Interactions.MultiTapInteraction)|`float`|[`InputSettings.defaultButtonPressPoint`](xref:UnityEngine.InputSystem.InputSettings)|

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ uid: input-system-device-capabilities

# Device capabilities

Part of the Device description can be a [`capabilities`](xref:UnityEngine.InputSystem.Layouts.InputDeviceDescription) string in JSON format. This string describes characteristics that help the Input System to interpret the data from a Device, and map it to Control representations. Not all Device interfaces report Device capabilities. Examples of interface-specific Device capabilities are [HID descriptors](hid-specification-introduction.md). WebGL, Android, and Linux use similar mechanisms to report available Controls on connected gamepads.
Part of the Device description can be a [`capabilities`](xref:UnityEngine.InputSystem.Layouts.InputDeviceDescription) string in JSON format. This string describes characteristics that help the Input System to interpret the data from a Device, and map it to Control representations. Not all Device interfaces report Device capabilities. Examples of interface-specific Device capabilities are [HID descriptors](hid-specification-introduction.md). Web, Android, and Linux use similar mechanisms to report available Controls on connected gamepads.
Comment thread
suearkinunity marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uid: input-system-event-processing

Each time input is processed, [`InputSystem.Update`](xref:UnityEngine.InputSystem.InputSystem) is called implicitly by the Unity runtime.

The interval at which this happens is determined by the ["Update Mode"](update-mode.md) configured in the settings. By default, input is processed in each frame __before__ <c>MonoBehaviour.Update</c> methods are called. If the setting is changed to process input in fixed updates, then this changes to input being processed each time before <c>MonoBehaviour.FixedUpdate</c> methods are called.
The interval at which this happens is determined by the [Update Mode](update-mode.md) configured in the settings. By default, input is processed in each frame __before__ <c>MonoBehaviour.Update</c> methods are called. If the setting is changed to process input in fixed updates, then this changes to input being processed each time before <c>MonoBehaviour.FixedUpdate</c> methods are called.

Normally, when input is processed, __all__ outstanding input events on the queue will be consumed. There are two exceptions to this, however.

Expand All @@ -17,8 +17,8 @@ When using [`UpdateMode.ProcessEventsInFixedUpdate`](xref:UnityEngine.InputSyste
The other exception are [`BeforeRender`](xref:UnityEngine.InputSystem.LowLevel.InputUpdateType) updates. These updates are run after fixed or dynamic updates but before rendering and used used exclusively to update devices such as VR headsets that need the most up-to-date tracking data. Other input is not consumed from such updates and these updates are only enabled if such devices are actually present. `BeforeRender` updates are not considered separate frames as far as input is concerned.

> [!NOTE]
> Manually calling [`InputSystem.Update`](xref:UnityEngine.InputSystem.InputSystem) is strongly advised against except within tests employing [`InputTestFixture`](xref:UnityEngine.InputSystem.InputTestFixture) or when explicitly setting the system to [manual update mode](xref:UnityEngine.InputSystem.InputSettings.UpdateMode).
> Manually calling `InputSystem.Update` is strongly advised against except within tests employing [`InputTestFixture`](xref:UnityEngine.InputSystem.InputTestFixture) or when explicitly setting the system to [manual update mode](xref:UnityEngine.InputSystem.InputSettings.UpdateMode).

Methods such as [`InputAction.WasPerformedThisFrame`](xref:UnityEngine.InputSystem.InputAction) and [`InputAction.WasPerformedThisFrame`](xref:UnityEngine.InputSystem.InputAction) operate implicitly based on the [`InputSystem.Update`] cadence described above. Meaning, that they refer to the state as per the __last__ fixed/dynamic/manual update happened.
Methods such as [`InputAction.WasPerformedThisFrame`](xref:UnityEngine.InputSystem.InputAction.WasPerformedThisFrame) operate implicitly based on the `InputSystem.Update` cadence described above. Meaning, they refer to the state as it was in the __last__ fixed, dynamic, or manual update happened.

You can query the [current/last update type](xref:UnityEngine.InputSystem.LowLevel.InputState) and [count](xref:UnityEngine.InputSystem.LowLevel.InputState) from [`InputState`](xref:UnityEngine.InputSystem.LowLevel.InputState).
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Input System implements PlayStation gamepads as different derived types of t
* [`DualShock4GampadiOS`](xref:UnityEngine.InputSystem.iOS.DualShock4GampadiOS): A DualShock 4 controller connected to an iOS Device with Bluetooth. Requires iOS 13 or higher.
* [`SetLightBarColor(Color)`](xref:UnityEngine.InputSystem.DualShock.DualShockGamepad.SetLightBarColor(UnityEngine.Color)): Used to set the color of the light bar on the controller.

Unity supports PlayStation controllers on WebGL in some browser and OS configurations, but treats them as basic [`Gamepad`](xref:UnityEngine.InputSystem.Gamepad) or [`Joystick`](xref:UnityEngine.InputSystem.Joystick) devices, and doesn't support rumble or any other DualShock-specific functionality.
Unity supports PlayStation controllers on Web in some browser and OS configurations, but treats them as basic [`Gamepad`](xref:UnityEngine.InputSystem.Gamepad) or [`Joystick`](xref:UnityEngine.InputSystem.Joystick) devices, and doesn't support rumble or any other DualShock-specific functionality.

Unity doesn't support connecting a PlayStation controller to a desktop machine using the DualShock 4 USB wireless adaptor. Use USB or Bluetooth to connect it. For more information on platform support for PlayStation gamepads, refer to [Supported devices reference](supported-devices-reference.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ On other platforms, Unity uses derived classes to represent Xbox controllers:

XInput controllers on macOS require the installation of the [Xbox Controller Driver for macOS](https://github.com/360Controller/360Controller). This driver only supports USB connections, and doesn't support wireless dongles. However, the latest generation of Xbox One controllers natively support Bluetooth. macOS natively supports these controllers as [HID devices](hid-specification-introduction.md) without any additional drivers when connected with Bluetooth.

Unity supports Xbox controllers on WebGL in some browser and OS configurations, but treats them as basic [`Gamepad`](xref:UnityEngine.InputSystem.Gamepad) or [`Joystick`](xref:UnityEngine.InputSystem.Joystick) devices, and doesn't support rumble or any other Xbox-specific functionality.
Unity supports Xbox controllers on Web in some browser and OS configurations, but treats them as basic [`Gamepad`](xref:UnityEngine.InputSystem.Gamepad) or [`Joystick`](xref:UnityEngine.InputSystem.Joystick) devices, and doesn't support rumble or any other Xbox-specific functionality.

For more information on platform support for Xbox gamepads, refer to [Supported devices reference](supported-devices-reference.md).
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This page lists Input Device types and products that the Input System package su

Support for the following Devices doesn't require specialized support of particular products.

|Device|Windows|Mac|Linux|UWP|Android|iOS|tvOS|Xbox(3)|PS4(3)|Switch(3)|WebGL|
Comment thread
suearkinunity marked this conversation as resolved.
|Device|Windows|Mac|Linux|UWP|Android|iOS|tvOS|Xbox(3)|PS4(3)|Switch(3)|Web|
|------|-------|---|-----|---|-------|---|----|----|---|------|-----|
|[Mouse](xref:input-system-mouse)|Yes|Yes|Yes|Yes|Yes|No|No|Yes|Yes|No|Yes|
|[Keyboard](xref:input-system-keyboard)|Yes|Yes|Yes|Yes|Yes|No|No|Yes|Yes|No|Yes|
Expand All @@ -27,7 +27,7 @@ Support for the following Devices doesn't require specialized support of particu

## Gamepads

|Device|Windows|Mac|Linux|UWP(13)|Android|iOS(6)|tvOS(6)|Xbox(7)|PS4/PS5(7)|Switch(7)|WebGL|
|Device|Windows|Mac|Linux|UWP(13)|Android|iOS(6)|tvOS(6)|Xbox(7)|PS4/PS5(7)|Switch(7)|Web|
Comment thread
suearkinunity marked this conversation as resolved.
|------|-------|---|-----|---|-------|---|----|----|---|------|-----|
|Xbox 360 (4)|Yes|Yes (3)|Yes|Yes|No|No|No|Yes|No|No|Sometimes (2)|
|Xbox One|Yes (1)|Yes (3)|Yes (1)|Yes|Yes (1)|Yes (6)|Yes (6)|Yes|No|No|Sometimes (2)|
Expand All @@ -38,7 +38,7 @@ Support for the following Devices doesn't require specialized support of particu

> [!NOTE]
> 1. The trigger motors on the Xbox One controller are only supported on UWP and Xbox.
> 2. WebGL support varies between browsers, Devices, and operating systems.
> 2. Web support varies between browsers, Devices, and operating systems.
> 3. XInput controllers on macOS currently require the installation of the [Xbox Controller Driver for macOS](https://github.com/360Controller/360Controller). This driver only supports only USB connections, and doesn't support wireless dongles. However, the latest generation of Xbox One controllers natively support Bluetooth, and are natively supported on Macs as HIDs without any additional drivers when connected via Bluetooth.
> 4. This includes any XInput-compatible Device.
> 5. Unity doesn't support motor rumble and light bar color over Bluetooth. Unity doesn't support the gyro or accelerometer on PS4/PS5 controllers on platforms other than the PlayStation consoles. Unity also doesn't support the DualShock 4 USB Wireless Adapter. On UWP, only USB connection is supported, motor rumble and light bar are not working correctly.
Expand All @@ -53,15 +53,16 @@ Support for the following Devices doesn't require specialized support of particu
> - On Android it's expected to be working from Android 12.
> - On iOS/tvOS it's currently recognized as a generic gamepad and most controls do work.
> 13. To ensure all controller types are detected on UWP, enable the HumanInterfaceDevice setting in [UWP Player Settings](https://docs.unity3d.com/Manual/class-PlayerSettingsWSA.html#Capabilities).
> 14. In Unity 6.0, the WebGL build target was renamed to Web. However, to maintain backward compatibility, the Input System APIs, device layouts, and interface names retain the WebGL prefix (for example, WebGLGamepad).

### WebGL
### Web

The Input System supports the *Standard Gamepad* mapping as specified in the [W3C Gamepad Specification](https://www.w3.org/TR/gamepad/#remapping). It also supports gamepads and joysticks that the browser surfaces without a mapping, but this support is generally limited to detecting the axes and buttons which are present, without any context as to what they mean. This means gamepads and joysticks are generally only useful when [the user manually remaps them](xref:UnityEngine.InputSystem.InputActionRebindingExtensions). The Input System reports these Devices as generic [`Joysticks`](xref:UnityEngine.InputSystem.Joystick).

Support varies between browsers, Devices, and operating systems, and further differs for different browser versions, so it's not feasible to provide an up-to-date compatibility list. At the time of this publication (September 2019), Safari, Chrome, Edge, and Firefox all support the gamepad API, but only Chrome reliably maps common gamepads (Xbox and PlayStation controllers) to the W3C Standard Gamepad mapping, which allows the Input System to correctly identify and map controls.

> [!NOTE]
> WebGL currently doesn't support rumble.
> Unity's Web platform currently doesn't support rumble.

## Other gamepads, joysticks, and racing wheels

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ uid: input-system-supported-sensors-ref

Each sensor device implements a single control which represents the data read by the sensor. The following sensors are available:

| Sensor | Description | Android | iOS | WebGL |
| Sensor | Description | Android | iOS | Web |
| :---- | :---- | :---- | :---- | :---- |
| [`Accelerometer`](xref:UnityEngine.InputSystem.Accelerometer) | Measures the acceleration of a device. | Yes | Yes | Yes |
| [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) | Measures the angular velocity of a device. | Yes | Yes | Yes |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class MyExampleInteraction : IInputInteraction
switch (context.phase)
{
case InputActionPhase.Waiting:
if (context.Control.ReadValue<float>() == 1)
if (context.control.ReadValue<float>() == 1)
{
context.Started();
context.SetTimeout(duration);
}
break;

case InputActionPhase.Started:
if (context.Control.ReadValue<float>() == -1)
if (context.control.ReadValue<float>() == -1)
context.Performed();
break;
}
Expand Down
Loading