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.
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
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.
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.
However here is a screenshot from my inputs assets, so the inputs are defined.
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:
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.
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.
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: