Let's discover a little bit more about some Android sensors and features that are shown in the simple code examples later in text.
You can also access the Android acceleration inside Unity. Let's upgrade our previous example, so we can see one more aspect of our Android device. The new piece of code is shown here:
GUILayout.Label("\n\n A C C E L E R A T I O N"); GUILayout.Label("Input.acceleration = (" + Input.acceleration.x + ", " + Input.acceleration.y + ", " + Input.acceleration.z + ")");
After running this test on your Android device, you will see how acceleration values change very quickly in real time.