Page 1 of 1

Detect if mouse or joystick is used in script

Posted: Thu Oct 07, 2021 6:09 am
by fallingstarint
Hello,

I have the component "Input Device Manager" on my Dialogue System, which is really useful but I also would like to integrate it in my Pause system via script.

Because I have a virtual cursor that I would like to disable and enable again along the pause state of my game and other conditions.

How would I check it in script?

Kind regards

Re: Detect if mouse or joystick is used in script

Posted: Thu Oct 07, 2021 9:00 am
by Tony Li
Hi,

You can check InputDeviceManager.instance.IsUsingJoystick(), IsUsingMouse(), or IsUsingKeyboard().

Re: Detect if mouse or joystick is used in script

Posted: Thu Oct 07, 2021 3:38 pm
by fallingstarint
Thank you kind sir.

Re: Detect if mouse or joystick is used in script

Posted: Thu Oct 07, 2021 3:42 pm
by Tony Li
Glad to help!