How to Track Small Changes in Mobile Device Rotation

I am trying to make a 2D mobile game where the game’s gravity changes as the device is rotated. However, the only relevant input that I can find in the Unity Docs is DeviceOrientation, which doesn’t help me because it is an enum with only 7 possible values. Is there any way to capture continuous changes in rotation, using Unity’s scripting engine?

Your help is much appreciated!

I think you’re looking for Input.Acceleration(x,y,z). It takes into account the tilt of the device, so the gravity can be changed just the direction you’re tilting your mobile.