Unity input system character control

Hi so im new to codeing and want to make a 2D platformer and im struggleing with the new unity inpud system i know ho to make the input actin map but i dont know how to make the script for it. Can someone help me please this is my input action map:

btww my input action is called Controls

Here’s one way to do it…

Set your Player Input component Behaviour to “Invoke Unity Events”

Create a method for retrieving the incoming values, here’s mine I use. Movedirection is what ends up getting passed into my RigidBody.

        public void OnMovement(InputAction.CallbackContext value)
            m = value.ReadValue<Vector2>();

            //y is actually going to go into z 
            //i'm just setting x / y to 0 if the input is less than .1 because that means we're barely touching the input and we probably dont intent to actually move.
            if (m.x < .1f && m.x > -.1f)
                m.x = 0;
            if (m.y < .1f && m.y > -.1f)
                m.y = 0;

            //assign the values into a vector3 that I use for movement 
            moveDirection = new Vector3
                x = m.x,
                y = 0.0f,
                z = m.y

Assign the Method in player inputs by expanding Events → Controls(Your input action map name) → Dropping your script with the below method into the Move field. (See pic below.)