Using UI buttons with the new Input System

I’ve been having trouble getting my UI buttons to work after updating to the new Input System. I tried all the fixes I found online, but none of them worked.

I updated EventSysten to use the new module:

I added a Tracked device Raycaster to the canvas object:

as suggested by My Buttons will not work with the new input system, i tried changing the update mode but it was already set to dynamic:

I also went through each of the buttons and made sure the listeners are all set up and working correctly. I can still toggle UI items with the hotkeys, but the mouse doesn’t seem to detect anything.

All of these things look right.

Can you show the full inspector for the Button? (with everything expanded)

Here is one of the buttons in my scene. I have the on click event hooked up manually, and I know the UI toggle itself works, because I can use the hotkey.

Do you have any sort of UI element that might be overlapping the buttons? Perhaps a transparent image for fading or to flash red when you’ve been hit?

Turns out it was the scene fader this whole time.

This is the same fader form the RPG course, looks like its overlapping the rest of the UI, as you suggested.

I turned off Intractable and Blocks Raycasts, and the problem went away.

I didn’t think of this right away because I was comparing everything off of the third person project. When I asked to see the button, I was looking to see if it was interactable and had a raycast target. That’s when I thought of overlays, as the Fader interferes with the UI if it’s Raycast Target is on.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms