Getting Two Input Devices to work Simultaneously...
Hello,
I had a bit of a field day thinking there was a problem being caused by the saving and loading functions in my rebinding system, but I've since realised it was more to do with Unity only supporting one device at a single time.
So, I have my game set up with separate input actions for my menus (which includes pausing), and the gameplay. The ones for the menus work perfectly fine for all input devices (keyboard, gamepad, USB controller).
However, when it comes to the "Player Input" actions, it only seems to be able to support one device at a time.
For example, I run the game normally and play using the keyboard, but when I plug in a controller, the keyboard inputs (for the player character, not the menus or pause) will stop working. This is especially annoying that when I unplug the controller, the gameplay inputs will remain off (sometimes even for the controller, if I unplug it and plug it back in).
Is there a way I can make ALL valid devices run simultaneously, no matter what devices are (or aren't) plugged in?
I also feel it's worth mentioning that the Player Input is set up like this for all actions: Binding 0 = Keyboard -- Binding 1 = Gamepad -- Binding 2 = USB Controller/Joystick
I'll also note that inputs in the same scene that use a different input system, all work fine (Pause Menu, Skipping Cutscenes).
Thanks in advance.
EDIT: I did a bit more investigation into this. It seems that if a whole scene/level is played with only the Controller, then the Keyboard inputs will disable in the next scene/level. Also, it seems ALL the inputs disable whenever my controller is unplugged mid-game (not by choice; the controller's USB connector is a bit dodgy sometimes).
Is there a way I can prevent this from happening at all, and just leave all input devices/bindings active regardless of what devices are or aren't plugged into the computer?
I also still can't wrap my head around why this only happens to my "PlayerInput" actions, and not any of the others.
Again, any help with this would be greatly appreciated.
Your answer
Follow this Question
Related Questions
my wireless switch Gamecube controller is read as a "Lic Pro Controller" how do I fix it 0 Answers
Input System 2019 : onCreatePlayer and onDestroyPlayer 0 Answers
2019.1.2f1 how to get knuckles/index controller finger axes input using OpenVR? 1 Answer
Sending data to custom HID device 1 Answer
Custom InputHandler is giving different results between Editor and final Build 0 Answers