I am using the new input system and have set up a conversation with an NPC which gives the player two choices to respond with. That all works fine, I can select the response using up and down buttons on the D-Pad or stick on the controller, and it also works when I use the keyboard up and down arrows or W and S keys to select my response.
However, if I move the mouse to select an answer, the answer which is currently selected (highlighted) loses its highlight and only highlights when the mouse hovers over it. Then if I try and use the keyboard buttons or controller, neither response is highlighted anymore and I cannot tell which answer I have selected.
Ideally I'd like to highlight an answer when the mouse hovers over it, but if the mouse is moving or not highlighting an answer, it remains highlighted so the user can select an answer with the controller or keyboard buttons.
**I have tried using different dialog UI's and all have the same results
Highlighted Color Disappears When Mouse Moved
Re: Highlighted Color Disappears When Mouse Moved
**Found the solution!**
I just had to enable 'Always Auto Focus' on the 'Input Device Manager' Script on the Dialogue Prefab asset
I just had to enable 'Always Auto Focus' on the 'Input Device Manager' Script on the Dialogue Prefab asset
Re: Highlighted Color Disappears When Mouse Moved
Hi,
Yup, that's the solution. This is by design. If you switch to using the mouse, it will no longer auto-focus buttons unless Always Auto Focus is true. Often, in mouse-driven games, designers don't want to auto-focus one of the responses because it might subtly prompt the player into choosing that response instead of considering all of the responses equally.
The Dialogue Manager's Input Device Manager component can automatically switch back to Joystick mode, in which it will keep a button focused. To do this, it checks the inputs specified in the Joystick Buttons To Check and Joystick Axes To Check. Since you're using the new Input System package, if you add anything to those lists, make sure to register them in your registration script (InputDeviceManager.RegisterInputAction).
Yup, that's the solution. This is by design. If you switch to using the mouse, it will no longer auto-focus buttons unless Always Auto Focus is true. Often, in mouse-driven games, designers don't want to auto-focus one of the responses because it might subtly prompt the player into choosing that response instead of considering all of the responses equally.
The Dialogue Manager's Input Device Manager component can automatically switch back to Joystick mode, in which it will keep a button focused. To do this, it checks the inputs specified in the Joystick Buttons To Check and Joystick Axes To Check. Since you're using the new Input System package, if you add anything to those lists, make sure to register them in your registration script (InputDeviceManager.RegisterInputAction).