Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Button UI Not Working with The new Input system

Discussion in 'Input System' started by suiksuiky, Dec 22, 2019.

  1. Nianyi_Wang


    Sep 9, 2021
    Yes. Sorry for the late reply. The solution is to upgrade the IS package to the latest version. There seems to be a bug in the earlier version.
  2. Galaxyben


    Jul 19, 2017
    This worked for me as well.
  3. chrisjfarr


    Feb 17, 2018
    The fact that this thread is two pages long with a dozen or so suggestions to fix this problem...makes me want to vomit when thinking about using this new Input System. I tried a few of these in the PlayGround.scene with just a simple Button added. Nothing changed, same behaviour. Cursor disappears when I click the Button, and the action is not invoked. No thanks Unity. Please take this garbage back to the drawing board.
  4. brianduper


    Nov 12, 2020
    this was my solve. so strange because i have a duplicate scene and the same setup with canvas and inputsystem worked fine. so weird this hidden setting was the trick.
  5. DiePflanze


    Jul 31, 2019
    Hey people, just wanted to add my solution after struggling for two days :/

    I use UI Toolkit and the new Input System. I also use the First Person Starter Asset. I copied the UI Actions from the DefaultInputActions into the StaterAssets ActionMap. In my case, with the help of this thread, i could get the Buttons to Highlight when i hovered them with the mouse, but no ClickEvent was fired when clicking, even though the buttons showed their clicked state (turning slightly grey when clicked).
    This post showed me a working solution:
    The problem was that i was enabling/disabling the UIDocument-gameobject for hiding or showing the UI, which seems to break the callback-registration i did in Start() or OnEnable().

    Instead, i did what was suggested in said thread and voilá, it worked. I do not enable/disable the UIDocument anymore, instead, i set its style.display property to DisplayStyle.None for beeing hidden or DisplayStyle.Flex for beeing show. Works like a charm and i questioned my life choices only four times trying to figure this out.
  6. Tradecenter77


    Jan 15, 2021
    OMG, after two days of headaches I found my solution. And I do feel kind of dumb about it.
    The Input System was on a fixed update, and my menus pause the game by setting Delta Time to zero. So, all my controls stopped working when I opened menus, but worked when I just launched the game with the menu open (because delta time wasn't set to zero which happens for me when I open a menu).

    Setting the update mode in the project settings to Dynamic update fixed my issue.

    Hope this helps someone.
  7. halley


    Aug 26, 2013
    I spent the better part of the day trying to figure out why my UI was totally unresponsive.

    I had the EventSystem. I had the Input System UI Input Module. The ISUIM's Actions Asset pointed to my Input Action Asset. All of the little fields like Point, Left Click, Move, etc., all appeared on the Component.

    But @celinedrules post above made me go check the contents of my Input Action Asset. Even though it was directly copied from the Starter Assets pack, I found that NONE of the UI/Whatever events were registered for KeyboardMouse or any other input scheme. Just blank. No checkmarks. Effing useless.

    Seriously, debugging crap like this is a drain of energy and makes me hate the Assets-wagging-the-Dog nature of the Input System all the more.
  8. tommyroberts526


    Jan 8, 2022
    This is probably from forever ago but oh my god tysm. This fixed my problem! :D
  9. Aida_Mercury


    Aug 24, 2020
    This fixed my problem -> EventSystem ->Input system UI input module (script) -> deselect on background click -> false.