I want to change the gravity in a 2d game with the click of a button.

Basically like VVVVVV. I’ve looked around for answers regarding my question but all the answers have just confused me more.

The Physics.gravity field represents the gravity being applied to all rigidbodies, changing that should change the gravity.