Closed tobias-stein closed 4 years ago
What's the debugger showing? Is input coming in as expected and accepted on the device(s)? Are the actions enabled?
Hi Rene, i took a screenshot showing the two paired mouse devices, both are receiving events as you can see from the log. The 'fire' action is enabled and working with the first (native) mouse, but not with the second one (the new remote-mouse I additanally paired).
It looks like the values of the controls on the virtual mouse are all at default. My guess is that the events are getting rejected. In Options
in the input debugger, when you flip on Enable Event Diagnostics
, are there errors in the console related to the virtual mouse? The input system should tell you about each event it's rejecting and tell you why.
I can see the timestamps on the events for the virtual mouse are all identical. Could be a problem though in general the system will accept events as long as timestamps don't go backwards in time. So it's likely something else.
The timestamps actually increase. What you see in the picture are probably some mouse move events. When I enable the diagnostics I cannot see any errors in the console.
Bump. Same issue here.
I'm building a game intended for local multiplayer. I'd like to give the first player the ability to use mouse/keyboard or a gamepad/joystick. This means having multiple devices of different types bound to the same PlayerInput.
The inputs-and-players portion of my object hierarchy begins with a single player GameObject. This GameObject has a PlayerInput component with DefaultScheme set to Keyboard&Mouse. When I press play, those keyboard and mouse controls work just fine. When I press a button on my joystick, my InputManager instantiates a second player-type GameObject. The PlayerInput component on this one is bound to the joystick device by the InputManager. My custom Player script notices that my first player has a keyboard/mouse, but not a gamepad. It then and uses PerformPairingWithDevices to pair the newly-noticed joystick device with the first player PlayerInput component. After the script runs, in the inspector, I can see that the PlayerInput component on the first player then has all three devices, just as expected: Keyboard, Mouse, and USB joystick controller. While the keyboard input has the expected effect, the joystick input has no effect. Joystick buttons don't send action/events.
Opening the input debugger, I can watch the USB joystick values change in realtime, so the hardware works and Unity is receiving input. Having turned on the event diagnostics, I can see a steady stream of events, none of which report errors.
Note that, if I modify my custom Player script to leave the device pairing untouched, and just hook up action-events, I can get and use joystick input events just fine. The problems only happen when I re-pair, when I add the joystick as a new device to the keyboard-and-mouse PlayerInput, and create the three-devices-in-one situation.
As best I can tell, it is as @tobias-stein says: InputUser.PerformPairingWithDevice'd devices actions are not fired.
Help appreciated ...
Hello,
we're going to close all the github issues and will concentrate bug information in the Unity public issue tracker https://issuetracker.unity3d.com/product/unity/issues?project=116&status=1&unity_version=&view=hottest.
If you are still experienceing this issue in the latest package version please do file a bug report as described here https://unity3d.com/unity/qa/bug-reporting For general feedback and discussions you can go to https://forum.unity.com/forums/new-input-system.103/
Thank you!
Hi, I've followed the UnityStreaming (WebRTC) example and setup a custom remote-input mechanism like the one in the example (https://github.com/Unity-Technologies/UnityRenderStreaming). I can read the input directly from the InputDevices, but when I try to setup a PlayerInput and try to pair these InputDevices to the UserInput using the static method InputUser.PerformPairingWithDevice I am able to pair the devices, but no actions are fired when new input arives. I have setup the default InputActionAsset, but nothing seems to work.
Can someone help me out? Is this a bug or am I missing something?
Cheers, Tobs.