- Home /
Question by
MASTware · Nov 29, 2016 at 01:33 PM ·
inputaccelerometermobile devicesacceleration
Detect if an acceleration sensor exist
If it possible to detect if the current device has an accelerometer? I know I can check if the input values of the input.acceleration
object are not equal to zero. But what is if the device is motionless rest on a table and that's the reason why all values are zero?
Comment
Best Answer
Answer by MASTware · Nov 29, 2016 at 02:11 PM
I found the solution: https://docs.unity3d.com/ScriptReference/SystemInfo-supportsAccelerometer.html