Simpliest way to use new input system with actions ?

The doc says : the new input system is good cause instead of
` var look = new Vector2();

var gamepad = Gamepad.current;
if (gamepad != null)
    look = gamepad.rightStick.ReadValue();

var mouse = Mouse.current;
if (mouse != null)
    look =;`  

you can now write
myControls.gameplay.look.performed += context => look = context.ReadValue<Vector2>();

but i would also like
Vector2 look = myControls.gameplay.look;
Is it something possible ? or using lamba is the right way to use the new input system ?
I use rarely lambda so they tend to hurt my brain

You can set the action to a method or use a lambda with a body if you want it to be multi line.


myControls.gameplay.look.performed += context => {
    // My code goes in here.

does that help?

To make a new unity input , you have to go to the unity input system. if you’re on windows hit the edit button the top left then hit project settings. Then on the left click input manager and then you can add new input and choose their button etc.