Buttons broken using new Input System
Asked Answered
N

4

6

I've got a problem that is seemingly impossible to debug. My project originally started using 2019.2 and upgraded to 2019.3 without any problems. I then installed the preview package for the new input system. This "disabled" all the buttons in that they are visible in the editor and during run time but they are impossible to click on or interact with.

To reproduce this issue I tried:

  1. Creating a new empty 2D project
  2. Installing and switching to the new Input System
  3. Importing their demo scene from the package manager

At this point I tried running each scene. All of them worked except "SimpleDemo_UsingActions.unity".

  1. I added a button to the "SimpleDemo_UsingPlayerInput.unity" and added a script to the button. With a function:
    public void Button()
    {
        Debug.Log("Button Pressed");
    }

I ran this scene and it worked! I could move around shoot the cubes that is built into the script and I could click on the button and it showed in the log.

For this reason I am stumped. I do not know how to debug this issue.

Can I have some advice? Has anyone had a similar issue or know how I would go about debugging this?

Nickienicklaus answered 1/2, 2020 at 10:47 Comment(2)
Unfortunately thats part of the joys of the new Input system, there is not a lot of documentation. It sounds as if you missed some steps in your project. But theres not enough here to be able to answerEdwardoedwards
Do you know why my answer fixed the problem? @EdwardoedwardsNickienicklaus
N
5

I managed to find the answer. For some reason using the new input system's "InputSystemUIInputModule" breaks all the UI and just does not work.

I fixed it by just deleting my EventSystem and creating a new one in the scene.

Do not. and I repeat. Do Not use the new input system's manager for the event system.

Nickienicklaus answered 1/2, 2020 at 11:33 Comment(2)
welciome to the joys of using something that is still in beta.. its probably some weirdo remnant, just like if you have terrains and try to use URP/HDRP if you upgrade with the terrain in the game, it doesnt work, if you export, pick a render pipeline and then import it, it loads it fine.Edwardoedwards
What is the "input system's manager"?Minuteman
S
4

I write answer because it's first result in google.

To get rid of this, select EventSystem in hierarchy, then in inspector you should see warning and button to replace old input system with new.

Unity ver. 2019.4.1
Input System ver. 1.0.0

Synchronize answered 1/7, 2020 at 16:46 Comment(0)
M
0

I'm still currently testing but I manage to get something by duplicating the defaultInputActions.inputactions file from the Packages >> Input System >> InputSystem >> Plugins >> PlayerInput.

I realized that that .inputactions has a UI Action Maps. I added more Action Maps and did some testing, the added action maps works and buttons are somewhat reacting as well.

Just sharing this now so that more developers can test this with me and hopefully find a way to work around this major issue.

Marcmarcano answered 8/2, 2021 at 9:0 Comment(0)
M
0

Had the same issue. Make sure that the input system package, does not have any devices inside... It worked for me after migrating from the Previous Input System

enter image description here

Maladapted answered 22/3, 2021 at 12:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.