InputSystemUIInputModule does not work with PlayerInput Buttons do not recieve input

Hi,

I’ve created a scene with my Inventory UI which has a EventSystem, a InputSystemUIInputModule and a PlayerInput components from the new Input system, the components are configured as shown on the screenshot.

The issue is that every time I enter play mode the buttons on the UI do not recieved any input.

No Input Example:

Input Allowed Example:

5471217--559551--takeInput.png

As soon as I remove the PlayerInput component the buttons become interactible again, but I lose the action of closing the UI with the tab key or the pause button on a controll.

I don’t know if this is a bug or it is just a miss configuration on my side.

Any help would be appreciated this is making me mad.

This was the only workaround I found: Do not combine the InputSystemUIInputModule with a PlayerInput component instead use the old StandarInputModule component so you can have custom inputs and buttons responding to clicks

5474772--560175--Annotation 2020-02-12 231038.png

Not optimal but until an official response this is what I’m going to do.

Hmm, which version of the input system is this happening with? There was a bug where having a PlayerInput would break the UI but that was fixed a couple versions ago.

Could you pop open the input debugger (Window >> Analysis >> Input Debugger) and compare the stuff in the “Actions” and the “Users” branch in the w/ PlayerInput case vs the w/o PlayerInput case?

Overall, what I’m seeing of the setup in the screenshots, I’d expect it to work just fine. Feel free to file a ticket with the Unity bug reporter and we’ll have a closer look at what’s happening here.

Hi,

I’m using Unity 2019.3.1f1 and the Input package version is preview.4-1.0.0

Here is the comparison with and without PlayerInput, I notice that for some reason the UI/Navigate, UI/Point and others from UI are empty in the case with PlayerInput.

5478987--560871--Annotation 2020-02-13 205535.png 5478987--560874--Without.png

However here is a screenshot from my inputs assets, so the inputs are defined.

Would like to take a closer look. Could you file a ticket with the Unity bug reporter?

I have the same issue, I’ve noticed that it suffices to disable PlayerInput during runtime to make it work and pinned down the issue to two functions inside OnDisable:

--InputUser.listenForUnpairedDeviceActivity;
m_InputUser.UnpairDevicesAndRemoveUser();

Calling them makes the mouse work again.

Oh nevermind, it turned out that my binding wasn’t assigned to control scheme.

The bug was patched in the last package update. But now there is a little bug in the PlayerInput component if you have assigned to a prefab.

The bug:

If you edit and save the prefab, no matter what you have change when you return to your scene for some reason the Actions property of the PlayerInput is set to null so if you enter play mode your character won’t move and if you are using Unity events all of them appear to be remove.

The Fix:

So in order to fix it you just need to reassign inside the prefab the actions property, it’s a little annoying but once you do that all the Unity events will be reassigned. Hope they will patch this little bug in the next update.

1 Like

I just found out why my buttons weren’t working. I posted the cause and solution here:

You say it was fixed but the FIX IS BROKEN in Unity 2020.3 LTS all versions up to 18f1! What a sad state. :frowning:

Same problem here. Sadly I switched to 2020 recently. Seems I have to move back. 2 days wasted.

I think I’m experiencing the same issue. Looking at my input debug, certain UI actions loose their binding when under a “User”, but not under “Actions”. However, I’m still experiencing this issue in Input System 1.3.0. Did anyone fix this by updating Unity as well? I have Unity 2019.4. If anyone has fixed this issue, please let me know what version of Unity and Input System they have installed.

Just looked into this possibility, and it was the case for me too. I hadn’t assigned a control scheme to some of my action bindings, so they weren’t working or showing up in the input debug.

I have a similar issue in Input System version 1.3.0 and Unity 2021.2.9. The UI Input wont work as long as the PlayerInput is enabled. When disabling the PlayerInput the UI works again.

EDIT: So my issue was that I couldn’t use a mouse as a touch input with the On-Screen Stick. As it turns out it was because the control scheme didn’t have mouse included as a requirement. Including it makes PlayerInput work with UI input as intended.

1 Like

I’m still having the same problem, if I enable the “Player Input” component my UI doesn’t receive any input anymore. Is there still a bug with Unity, or does anyone know some type of fix for this?

In my case, the issue was that I created my custom input actions asset from scratch and created a keyboard control scheme there, instead of creating keyboard&mouse control scheme. I then selected and copied the actions from the DefaultInputActionAsset and pasted the UI part into my own one, but it didn’t get mapped to any control scheme, because DefaultInputActionAsset is using keyboard&mouse scheme and mine didn’t have it.

What was happening was that before spawning player, I was able to work with UI using mouse, but after spawning player with PlayerInput component I was not.

What I suggest to try is to locate the original DefaultInputActionAsset, create a copy of that, assign it to your playerInput and start building on top of it, instead of starting from scratch, and then check whether the issue persists.

I had similar issue, the HUD UI is working at start of the game, after opening then closing the main menu (Which enable UI map, then disable it) makes my HUD is not accepting any pointer interfaces like “IPointerDownHandler” and “IPointerClickHandler”.

I solved my issue by making the event system and Input System UI Input Module in the same object of Player Input:

Hope it help someone! Since it was pain for me :smile:

Unity version: 2022.3.7f1
Input system version: 1.6.3


I had this issue recently and I solved it by updating the ActionMap to click the appropriate Use In Control Scheme options :person_facepalming: