- Home /
iOS: Performance gain by disabling accelerometer?
Is there any performance gain when I disable the accelerometer? Or gain when I lower it from 60 Hz to something lower?
Thanks!
Answer by HarshadK · Dec 17, 2014 at 02:24 PM
From Unity manual page about iOS Specific Optimizations it states that:
If accelerometer input is processed too frequently then the overall performance of your game may suffer as a result. By default, a Unity iOS application will sample the accelerometer 60 times per second. You may see some performance benefit by reducing the accelerometer sampling frequency and it can even be set to zero for games that don’t use accelerometer input.
Basically the reason for this is Unity needs to check for inputs which surely wastes some CPU cycles which could actually have been used for game logic processing where it is actually needed. Also turning off accelerometer if it is not used in the game saves draining of battery which is also a benefit that you can provide your user or to your own application itself.