// Код самого войда
private void OnTriggerStay2D(Collider2D collision)
{
isGrounded = true;
}
// И прыжок
void FixedUpdate()
{
if(isGrounded == true && Input.GetKeyDown(KeyCode.Space))
{
rb.AddForce(Vector2.up * jumpForce);
isGrounded = false;
}
}