Input system -- UI does not receive input events

Gugbert

New member
Steps to reproduce:

  • Setup a clean UCC project ( I used the latest 2.4.8 ) + Input system integration
  • Add a UI via the Character Manager and add a Button to the Canvas
  • In the EventSystem/Input System UI Input Module set the CharacterInput.asset from the integration into the Actions Asset field
--> until this point everything works fine, the Button receives the left mouse click

  • add a character ( Nolan ) via the Character Manager to the scene
  • remove the Unity Input component from Nolan
  • add the Unity Input System component to Nolan, Player Input is added automatically
  • in the Player Input set the Actions field to same CharacterInput.asset as above
  • in the UI Input Module field set your EventSystem object
--> now the Button doesn't receive the left mouse click anymore

I used Unity 2020.3.34f1 and UCC 2.4.8 and Input system integration from today
 
Are you sure nothing is blocking the EventSystem from receiving clicks? There isn't anything within the integration that is stopping the clicks so this sounds like it's a more general Unity issue.
 
To exclude any external causes, I set up the scenario as described above. There is nothing involved other than UCC and the integration.

I did some more tests:
  • set the DefaultInputActions.asset from the InputSystem package ( Unity ) in the EventSystem/Actions Asset field, then the Button gets the events ( must unset the Player Input/UI Input Module first )
  • set the CharacterInput.asset from the integration in the EventSystem/Actions Asset field again, then the Button doesn't get the events ( Player Input/UI Input Module left unset )
 
Hmm, I'm not sure why it's working for me. Have you tried regenerating the input actions asset? If you compare the actions asset do you notice anything different besides the bindings?
 
Regenerating the input actions asset didn't lead to any success. If I remove Nolan, the button gets the event, after adding him again, the button didn't get the events.

In the Unity documentation, I found something about ambiguities when using UI and game input, and it must be handled somehow, but I don't know what to make of it, yet. Maybe I'll dive a bit deeper into this.

In the meanwhile I set up the same scenario with the old input system and it works fine. Btw, for easy testing this scenario, I configured the Jump-Ability to start with 'Fire1'-Input and Nolan jumped when clicking on the button. I think that's why there is a 'Block Over UI' option in the Use-Ability, so there is no concept of 'consuming' events in the UI, right?
 
I have seen the character responding to a click event over the UI but I haven't seen the reverse of what you are seeing with the UI not responding to a click but the character responding. The fact that the actions action works with the default one makes me think that it is something related to that. What if you slowly add the bindings to the default actions asset - are you able to narrow down when the input stops working? The Block Over UI option is for stopping the click event when clicking on a UI which is the first case that I mentioned.
 
Finally I got it working. Indeed it was a little something which didn't catch my eye.

Looking at the input debugger ( 1st screenshot ), I saw there was no binding with the UI-Actions. In the CharacterInput.inputactions, I gave all UI-Actions the 'Tick' in the Keyboard control schema ( 2nd screenshot ) and then all the UI-Actions had key/mouse bindings ( 3rd screenshot ).
I think it is definitely worth to update the CharacterInput.inputactions in the integration package.
@Justin: Thank you for your patience.
 

Attachments

  • Input Debugger.JPG
    Input Debugger.JPG
    91.2 KB · Views: 15
  • Control schema.JPG
    Control schema.JPG
    115.5 KB · Views: 18
  • Input Debugger2.JPG
    Input Debugger2.JPG
    105.9 KB · Views: 20
Top