How to access the gravity scale on a rigid body 2d

How do you access the rigidbody2d.gravityScale on a object in unity?

GetComponent<Rigidbody2D>().gravityScale

it’s a float…

ok thanks, though it was like that