Onscreen Butten and Onscreen Stick isn't working

I have put 2 buttons on canvas and both has got on-screen button, which which is supposed to act as gamepad left stick/ left and right. So in Input Actions, I set gamepad left stick/left and right bindings, and player object has been set a player input which has call back context of gamepad, which should call a method, which prints “Touch Fired”, atleast that’s how I want it to work. But when I click those buttons while game is running, nothings prints in the console. But the keyboard actions that i have set works correctly. So i tried setting up a dummy onscreen stick, and in run mode im able to move the stick but that also isnt firing the OnTouch method which is supposed to print “Touch Fired” in console.

PlayerControls.cs :

using UnityEngine;
using UnityEngine.InputSystem;

public class PlayerControl : MonoBehaviour
{
    public Rigidbody rb;
    public float forwardForce = 2000f, horForce = 2000f;

    private float inputMovement = 0, rawInput;

    [SerializeField] private PlayerInput playerInput;

    public void OnMovement(InputAction.CallbackContext value)
    {
        Debug.Log("Keyboard Fired");
        inputMovement = value.ReadValue<float>();
    }

    public void OnTouch(InputAction.CallbackContext value)
    {
        Debug.Log("Touch Fired");
    }

    void FixedUpdate()
    {
        rb.AddForce(inputMovement * horForce * Time.deltaTime, 0, forwardForce * Time.deltaTime);
    }

}

Here is my Input Action and button setups, followed by player settings


Where do you get this error? On player mode in editor or On any mobile device?
Because “Use in control scheme” value is mobile. This means it works only on “Mobile”.
Actually I can’t see which devices are in the “Mobile” scheme but, I guess your problem is related with this.

I get the error in unity editor, but even if i set control scheme to both mobile and keyboard, and run OnTouch method isn’t called.
Mobile has gamepad device and keyboard has keyboard.

Same problem here. Do you solve it?

Nope. I then only made it for computer and removed all of buttons in the canvas.