In my quest to get a gamepad to work for my main game on android, it’s turning out to be a pain.
although everything is working now apart from the triggers on android.
Although slightly off-topic I did a post last night about the problem with “devices[a] is UnityEngine.InputSystem.Joystick” android always thinking it has a joystick attached, this apparently I found out tonight that the above code or “UnityEngine.InputSystem.Joystick” happens to be needed if you have a controller present well the 8BitDo anyways, otherwise, it does not function “pick up the controller” for windows.
UnityEngine.InputSystem.Utilities.ReadOnlyArray<UnityEngine.InputSystem.InputDevice> devices = UnityEngine.InputSystem.InputSystem.devices;
if (devices.Count > 0)
for (Int32 a = 0; a < devices.Count; ++a)
if (devices[a] is UnityEngine.InputSystem.Joystick || devices[a] is UnityEngine.InputSystem.Gamepad)
{
mManagers.Project.Settings.DeviceType = DeviceTypes.GAMEPAD;
Debug.Log("A Gamepad Has Been found");
break;
}
So back to the case in point, as you can see from the screenshot the 8BitDo’s triggers are Button9 for left Trigger and Button 10 for the right trigger, I used the listening button to find these as it does not use the traditional left/right trigger syntex, when running on windows the triggers work fine, but on android I get nothing, I did also look at the windows input debugger window to verify that the buttons are firing and they are.
has anybody got any idea’s, how to fix this?