Is there any way to determine if controller/gamepad is PlayStation/DualShockGamepad in Windows?

When I use the following code with my PS3 controller in Windows 10, the Joystick Name is “Controller (XBOX 360 For Windows)”. I’m using Scp Toolkit to get the PS3 controller to work. Unity detects the PS3 controller correctly in Mac OS though I had to use ds3activate. Is there any method to detect the PlayStation controller correctly including using the Steam settings?

        if (Gamepad.current == null)
        {
            Debug.Log("None");
        }
        else if(Gamepad.current is UnityEngine.InputSystem.DualShock.DualShockGamepad)
        {
            Debug.Log("DualShockGamepad");
        }
        else if (Gamepad.current is UnityEngine.InputSystem.XInput.XInputController)
        {
            Debug.Log("XBox");
        }
        else
        {
            Debug.Log("Other");
        }
        foreach (string joystickName in Input.GetJoystickNames())
        {
            Debug.Log(joystickName);
        }

BTW when the game starts the Player.log file says:

New input system (experimental) initialized
Using Windows.Gaming.Input

If you want to use it as a PS3 controller, don’t use a conversion tool as scp. This converts ps3 input to Xbox, as that’s better supported. Can you try without it and just detect inputs?

I tried DS3 Tool (MotioninJoy) but it doesn’t seem to work due to the website being closed down (and it needs to access it).

I tried Better DS3 but it requires MotioninJoy.

I tried DS4 Windows but the PS3 isn’t showing up.

DsHidMini works and the joystick name is “DS3 Compatible HID Device”. It is detected as XInputController and not DualShockGamepad.

I’ll probably get a PS4 controller soon. Hopefully that will be detected by unity properly as a PlayStation controller.

Do you actually need a tool? I’m pretty sure I’ve been able to plug in either my PS3, PS4 or even Switch Pro controller and Windows and Unity identified them correctly.

That or it was Steam doing the translation there.

It wasn’t working in Windows 10 originally. I just tried my Windows 11 computer and it shows in the Game Controllers as PlayStation 3 by default but it doesn’t respond in the test section in properties.

It is detected properly in my unity game in Windows 11 but otherwise doesn’t respond.

My PS3 controller seems to be recognised by Windows 10 and Unity fine, though it seems to just bombard both with random inputs. It is pretty old and beat up, though.

My PS4 controller works fine.

And the PS3 is nearly a two decade old console. I don’t think its really worth worrying about supporting something that old at this point.

My PS3 controller also gives random inputs if I push the USB cable near the controller around.

That just sounds like a funky cable or port. Maybe try Bluetooth.
I’m general Playstation controllers work out of the box with Unity if you set up Unity properly. Those tools are for released games with no proper support. You could remove all the tools, develop in Unity like normal, and use Steam Big Picture for gaming with their controller wrapper

The controller is ok as long as I don’t bump the cable. It doesn’t seem to work with Bluetooth on Windows 11 (and my other computer doesn’t have Bluetooth). It’s good to hear that PlayStation controllers should generally be detected properly in Unity. I’m going to get a PS4 controller soon.

I got a PS4 dualshock controller and it works well in USB and bluetooth on Windows and Mac for my unity game.

BTW just about how I used this knowledge…

In the input system I used the generic gamepad - e.g. north, east, south, west buttons, etc.

Then if it was detected as a PlayStation I’d use the following sprites: triangle, circle, cross, square - and for xbox, etc, I’d use Y, B, A, X, etc.