PlayStation gamepads
The Input System implements PlayStation gamepads as different derived types of the DualShockGamepad base class, which derives from Gamepad:
DualShock3GamepadHID: A DualShock 3 controller connected to a desktop computer using the HID interface. Currently only supported on macOS. Doesn't support rumble.DualShock4GamepadHID: A DualShock 4 controller connected to a desktop computer using the HID interface. Supported on macOS, Windows, UWP, and Linux.DualSenseGamepadHID: A DualSense controller connected to a desktop computer using the HID interface. Supported on macOS, Windows.DualShock4GampadiOS: A DualShock 4 controller connected to an iOS Device with Bluetooth. Requires iOS 13 or higher.SetLightBarColor(Color): Used to set the color of the light bar on the controller.
Tip
Each platform-specific class exists only in builds for the platforms it supports. For example, DualShock4GamepadHID doesn't exist in Android or iOS builds, so code that uses it doesn't compile for those platforms. To write code that works on every platform, use the DualShockGamepad base class, or wrap platform-specific code in conditional compilation directives.
Unity supports PlayStation controllers on Web in some browser and OS configurations, but treats them as basic Gamepad or 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.
Touchpad
PS4 and PS5 controllers have a touchpad that the user can press like a button. The Input System reports touchpad presses through the touchpadButton control. To bind an action to a touchpad press, use the <DualShockGamepad>/touchpadButton control path.
Only the following devices report touchpad presses:
DualShock4GamepadHID: A DualShock 4 controller connected to a desktop computer.DualSenseGamepadHID: A DualSense controller connected to a desktop computer.
On iOS and Android, the touchpadButton control exists, but the Input System doesn't report touchpad presses, so actions bound to it never trigger.
The Input System doesn't report where the user touches the touchpad, so you can't read finger positions or swipe gestures from it. On PlayStation consoles, refer to the documentation for your platform package.
Input output control commands
Because of limitations in the USB driver and the hardware, the Input System can only service one IOCTL (input/output control) command at a time. SetLightBarColor(Color) and SetMotorSpeeds(Single, Single) functionality on Dualshock 4 is implemented using IOCTL commands, so if either method is called in quick succession, it's likely that only the first command will successfully complete. The other commands are dropped.
If you need to set both lightbar color and rumble motor speeds at the same time, use the SetMotorSpeedsAndLightBarColor(Single, Single, Color) method.