Controller registered twice: Wireless and Wired Connection

Hey ya’ll,

So I have a wireless PS4 controller connected to my laptop which Unity correctly displays in the InputDebug menu.
When I plug in the wireless controller with a USB cable into my computer, Unity recognizes it as another device and adds an entry in the InputDebug menu for a second device.

Now I am unsure if this is expected behavior but regardless is there a way to compare the devices plugged in to the existing ones so I can bypass this situation? \

Thanks

This seems to be something I have no control over. Unity’s InputSystem is registering the wireless controller and its USB connection as two separate devices. Looking through all the documentation I can’t seem to find any answers.

I thought maybe I should manually add devices to the Input System, but that still won’t help in this case since I have no way of knowing whether the devices are both pointing to the same controller just with different connections.

So after some serious digging I think I found a potential solution. In the device’s HID descriptor it has information like vendorId, productId and manufacturer, etc.

After some testing I think I figured out that devices have unique vendorIds. So I am using that info on gamepads trying to connect and if I find a matching vendorId then I skip adding that player.

@Balush Did your potential solution end up working for you? I recently ran into this issue and compared all the info in the description object, but I couldn’t come up with a guaranteed way to know which pair of wired/wireless input devices reference the same physical device. I’m handling multiple controllers for multiplayer, and if 2 PlayStation controllers are connected, they have the same vendor ID, and possibly the same product ID, making it trickier to differentiate between them.