New Input System and PlayerInput

Hi guys, I’m trying to convert my game to use the new input system, version 1.7. Its a mobile game where I want to use on screen controlls for movement and jumping.

In my simple example I have a jump controlled by a On-Screen Button mapped to the Control Path "Button South (Gamepad). To execute the jump I have a PlayerInput component with a Unity Event. This is set up as in the few samples I have found.

The problem is that the Player Input scheme keeps changing back and forth between Touch and GamePad when i touch the On-Screen button. Sometimes cancelling the jump, and making the On-Screen button unresponsive.

I tried disabling Auto-Switch, setting the default schema to GamePad, but then the On-Screen button does not trigger at all.

For testing I’m using the simulator game view with “Simulate Touch Input from Mouse” enabled in the Input Debugger.

I have also tried the On-Screen Stick, with the same type of problems.

What would the correct way to setup and configure Action, PlayerInput and On-Screen controls? Seems like my sample should be one of the simplest to setup and use, almost out of the box?

Please help.

1 Like

Okey, so I finally got it to work by combining the control schemes for touch and gamepad. Now the player input control schema changes to a Gamepad&Touch schema.

1 Like

Thanks! You just saved me after 3 days!