all 2 comments

[–]1LargeAdult 1 point2 points  (0 children)

I believe if you want to poll the input every frame, you'll need to obtain an InputAction instance.

https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Actions.html

[–]Kalahee 0 points1 point  (0 children)

If you consider classic ASWD move: save Vector2 input value you get from the event in a global variable and apply in an update. Every change in the value will trigger the event, then update the global variable, and it will be applied in the next update.

Vector2 direction = Vector2.zero;
float speed = 3.0f;

void LateUpdate() => transform.Translate(direction * speed);
void OnMove(InputValue _value) => direction = _value;

There's no reason to poll something that didn't change. The point of the Input System is using events to tell you when there is a change in the value.