So, is this the only way to check that information?
if (device.description.deviceClass.Equals("Gamepad"))
{
if (device.displayName.Equals("Xbox Controller"))
{
// Do something blah blah
}
}
Isn’t there another way less error prone? or at least more standardized name conventions? Input Debugger says it’s an XInputController, while property displayName says it’s an Xbox Controller, and while I know they’re both right, what I don’t know is which to use in this case; does it matter?
I couldn’t find any similar cases in the documentation (the most similar was the case of wanting to detect whether we are using a keyboard or a gamepad).
Well I’ve realized the code doesn’t even work lol. I mean, it detects the gamepad, but it doesn’t check the controller name, which again, is part of the problem I’m presenting here.
Ahhhhh! So that’s it! I did read about the XInputController class, but I thought it was part of Gamepad (I misunderstood that: it actually inherited from Gamepad), so when I tried to use it I couldn’t. Now, being from InputSystem.XInput is something very different. Well thanks again @Rene-Damm !