Input Actions expose phases:
startedperformedcanceledExample:
void OnEnable()
{
jumpAction.action.performed += OnJump;
}
void OnDisable()
{
jumpAction.action.performed -= OnJump;
}
private void OnJump(
InputAction.CallbackContext context)
{
Jump();
}
Read a value from the callback:
Vector2 movement =
context.ReadValue<Vector2>();