docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Unity supports PlayStation controllers on WebGL 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.

    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.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)