New Input System Not Triggering Callback Events

Hey friends,

I’m having an issue using the new input system. I can’t get any of my callback functions to fire at all. I’ve used the new input system in previous projects, and have never had this issue before.

I’m currently on V 2021.1.25f1 after upgrading from 2020.3.7f1 hoping that would help. It did not.

I’ll attach a few pictures and code for all my scripts/components and see if maybe anyone can find something I’m missing?

This is what I’m hoping to call

public void FireInput(InputAction.CallbackContext context) {
        print("Fire");
        Shoot();
    }

I have also tried switching the project settings Player > Active Input Handling to both “Input System Package (New)”, and “Both”, with the same results.

Also shortly after I took the screenshots I did assign a camera to the player input component, still with no success.

I don’t think this will fail in all platforms right ?
Are you using Android ?
What version of Input System are you using.
I have similar problems with Android.

Currently I’m targeting just standard pc platform, specifically Windows x86. That being said it doesn’t even work in the editor play mode, I haven’t tried building the game to actually test it.

I’m using Version 1.0.2 - January 21, 2021 of the input system, the one currently found in the package manager

I also just tested with a fresh unity project and I am having the same issues…

For a little more context, my previously shown fire event is set to be called when we press either the right trigger on a gamepad, the left click on a mouse, or the e key on a keyboard. None of these have worked.

Small update here

So I changed my input map to require specific controllers for my Gamepad and KBM maps, and now the keyboard and mouse is working.

I’m still having troubles getting the 360 controller to work however. I know that the input system sees it because I get the following messages when I connect/disconnect the controllers I’ve tried

“Joystick connected(“Controller(XBOX 360 For Windows)”).”

“Joystick disconnected (“Controller (Xbox 360 Wireless Receiver for Windows)”).”

The weird thing is that I only thought of doing this by opening an old project that still worked, which had the “required” settings enabled. This old project however works with my wireless 360 controller, using seemingly the same setup I am now having issues with.

1 Like

I got it figured out. Turns out I’m the problem…

So in my input map for my “Gamepad” control layout, I had set multiple devices as required devices (Xbox, Ps4, Switch, etc).

I changed the layout to only require gamepad, and now everything works.

7 Likes