Page 1 of 1

InputDeviceManager.deviceUsesCursor override?

Posted: Wed Jul 17, 2019 5:18 pm
by Snebjorn
Hi,

Working on a project where I want the mouse cursor to always be rendered as a UI sprite (using my own scripts) and never have the system cursor showing, but it seems that InputDeviceManager insists on the system cursor when mouse input is detected.

The static property deviceUsesCursor is true if it detects mouse input. Is there a way to override this, apart from making changes to the InputDeviceManager class itself, which will be overwritten if I update DS at some point?

Not a huge problem, but I try to avoid changes to the framework.

[Edit] Just realised this also affects CursorLockMode - so the question is really: what's the best way to never show the system cursor, but still have normal mouse input?

Cheers,
Snebjørn

Re: InputDeviceManager.deviceUsesCursor override?

Posted: Wed Jul 17, 2019 8:01 pm
by Tony Li
Hi Snebjørn,

Untick the Input Device Manager's Control Cursor State checkbox.

If this checkbox is unticked, it won't lock the cursor or control its visibility.

Or you can remove the Input Device Manager component entirely if you prefer. However, if you do this, the Dialogue System's UIs will always auto-focus. That is, when the Dialogue System displays a response menu, it will make sure a response button has focus so you can navigate with joystick or keyboard, and similarly for quest log windows.

Re: InputDeviceManager.deviceUsesCursor override?

Posted: Fri Jul 19, 2019 4:57 am
by Snebjorn
Doh - right there in front of my eyes the whole time ...

Thanks!

Re: InputDeviceManager.deviceUsesCursor override?

Posted: Fri Jul 19, 2019 7:57 am
by Tony Li
Glad to help!