Need help! Unity Input System Mouse totally not detected, clicks not happening

I am working on a fresh project using Unity’s Input System 1.4.4. (Unity Engine Version 2021.3.9f1), Windows system.

For whatever reason, I’m not getting any input from my mouse whatsoever. I’ve gone through and idiot-checked everything several times, I’m pretty sure, and it all is supposedly working fine.
I have an Input Action Asset named Controls, and my Action Map has a binding for “Click”. I bound Mouse → {Left Button} to the Click action, and set up a controller that has a hook for OnClick (I’m using the SendMessages behavior.) When I set Click to be triggered by the Space bar, I confirmed that the entire system was functioning correctly.

In the Input Debugger, I’ve noted that my connected mouse does not seem to be showing up under Supported Devices, which may account for the fact that I’m not getting any mouse events whatsoever. I tried plugging in three different mice, but all showed up as Unsupported.

Is there something big that I’m missing? Any help would be greatly appreciated.


Pardon me but the device listed under “Unsupported” seems to be a Razer Anansi, which is a keyboard right? There is indeed a mouse listed under devices which should work just fine.

Maybe share your code, screenshots of the input actions asset setup (especially the Click action), and screenshots of your console window when you try clicking your mouse.

The code is pretty straightforward, and I’ve already confirmed that it works successfully with the keyboard. Here’s a link just so you can see for yourself:


When the game is running, and I press the space bar, Input Debugger shows events going on the keyboard as normal, and “Click detected” displays in the log. I suppose you’re right about the unsupported keyboard thing, but that just mystifies me more. The mouse under supported devices doesn’t register any events, as you can see in the following screenshot:


This is the result of me clicking around the playing area, moving the mouse, and just trying to get some sort of reaction.

Thank you again for your help.

In case it would help you to note the difference, here’s what the properly displaying events from the Keyboard look like:

ISSUE RESOLVED

And of course, it was something silly. I found out that the option to “Simulate Touch Input From Mouse or Pen” was checked on in the input debugger, somehow, which suppresses mouse events. For anyone else who follows my foolish path, you can turn it off under “Input Debugger → Options”.

3 Likes

OH MY GOD THANK YOU !

1 Like

Thank you very much. This issue has been bothering me for a long time

I wrote my own MicroTouch class to combine-collect all touches and mouse and present them as a single array of MicroTouches, very analogous to the sealed Unity Touch struct.

It’s a small simple class, give it a whirl if you like:

It’s glorious to never again write custom mouse handling code: one code path, mobile and desktop and webGL

awesome

For me i i was in simulator mode. Mouse clicks only happen in game mode.

Thanks for the tip, also if you add a simulator tab, the mouse get disabled by default, and you need to enable it each you are in game mode

1 Like

Thaaaaaaaaank you. This has been driving me crazy.

I want to add that disabling simulating touch also worked for me. The weird thing is I did that before and it didn’t work and in addition, I have touch code that should work with simulated touch. I found out there is a bug with simulated touch where it just straight won’t work, even when it shows hex feedback in the input debugging, and even when you have specific code trying to force simulated touch to work.

I have not been able to get simulated touch to work at all, I have posted asking for help in the input forum, but no luck with anything so far. I am using Unity 6.

The new input system has many frustrating bugs and Unity needs to take a look at some of these issues