Android Scripting

Unity Android provides a number of scripting APIs unified with iOS APIs to access handheld device functionality. For cross-platform projects, UNITY_ANDROID is defined for conditionally compiling Android-specific C# code. The following scripting classes contain Android-related changes (some of the API is shared between Android and iOS):

InputAccess to multi-touch screen, accelerometer and device orientation.
iPhoneSettingsSome of the Android settings, such as screen orientation, dimming and information about device hardware.
iPhoneKeyboardSupport for native on-screen keyboard.
iPhoneUtilsUseful functions for movie playback, anti-piracy protection and vibration.

Further Reading

Page last updated: 2010-09-08