I have a rigidbody on my game object with no gravity, how can I enable the gravity through code?
Do you want to enable/disable gravity on individual objects? The set each object’s rigidbody.useGravity property to true or false as needed.
Do you want to enable/disable gravity globally? If so then set the Physics.gravity property to whatever direction vector (even if of zero length) as necessary.