I’m trying to make virtal cursor.
I wrote my custom device to provide position and bind it to “UI/Point”, it works fine, cursor moves = ui reacts on hover. But click does not work, because it comes from mouse device.
Events can come only from only one device in same time, right?
Also I checked InputSystemUIInputModule, it seems it has hardcoded mouse related code (not sure about it).
Please, show me the way to make virtual cursor (for gamepad).
Binding “UI/Click” to e.g. the gamepad A button should do the trick.
It has what it calls a “mouse model” to serve UI pointer events from but the source input data for it is not locked to mouse input. Click counts are mouse-only ATM (as they don’t come in through bindings; something that should be fixed IMO) but clicks aren’t.
Just for reference, 1.0.0-preview.5 will come with an example for how to set up a gamepad mouse cursor which also contains a reusable component that does most of the work.