Input.acceleration always returns zero on specific project

Hi so Im stuck with the following problem developing for Android - Input.acceleration always returns zero, but only on specific project. The accelerometer works fine on other projects, but I get zero on a specific project in more than one device. So I am wondering if there are any project settings that can disable Input.acceleration.

Turns out the MobileCore ads that I was trying out were to blame. Their SDK is somehow completely desabling the gyro.

There is, actually: It’s called Input.GyroEnabled or something like that if I remember correctly. Just look through all of Input’s properties, you’ll know which one it is. I think it has Gyro in the name, so if you’ve already looked for “AccelerationEnabled” and not found it, look again and you’ll see it.

I’ve heard of people having issues similar to this; something not working in just one project when it really should. The only general solution I’ve seen is to export your entire project as a .unitypackage, then make a new project and import it. It seems to fix a lot of problems, and it’s worth a shot.

There is an AccelerometerFrequency setting, only visible int he Player settings inspector for iOS builds.

I was developing on Android, and using Cloudbuild to build for iOS. This setting is invisible in my editor, but you can go into ProjectSettings\ProjectSettings.asset and find accelerometerFrequency: 0 and set it to 30 or 60

More info here: Input.accelerometer x,y,z always returning zero - Unity Answers