How to disable joystick/keyboard from interacting with dialogs in Unity UFPS

paphus

New member
I am developing a 3D game with a custom chat console using Unity and UFPS, https://assetstore.unity.com/packages/tools/game-toolkits/ufps-ultimate-fps-106748

Everything is working, but running on Android TV with a joystick, keyboard and mouse we want to control which input affects what.

So we want the dialog to only be able to interact with the mouse. and the joystick to only interact with the game/player.

Original the mouse was controlling the players looking, and able to select the dialog. I was able to disable the mouse from controlling the player by,

Unity menu, Edit, Project Settings, Input

Then finding the "Mouse X" and Mouse Y" input events and renaming the ones with the mouse input to "Mouse XX", and leaving the joystick axis events for "Mouse X" so the joystick can still control the players looking.

Now I am having the opposite issue, the joystick and the arrow keyboard keys are toggling the selection in the dialog, and the joystick button/space key trigger selection in the dialog. I want to disable this so only the mouse can interact with the dialog and the joystick on controls the player movement.

I tried changing the Input for "Horizontal" "Vertical" by renaming to "Horizontal xxx". This works, but then the joystick is also not controlling the player movement. So how can I make these separate events. I cannot find any code listening to "Horizontal" or "Vertical" events, these seem to be hardwired in Unity some how??
 
You can use the OnEnableGameplayInpuy to prevent the controller from responding to input. Take a look at the events section of the input documentation for an example.
 
Thanks. I ended up unclicking "Send Navigation Event" on the EventSystem object in Unity. This seemed to work.
 
Top