Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Mobile / Android

Adding x86 Support to Android* Apps Using the Unity* Game Engine

0.00/5 (No votes)
2 Mar 2015CPOL2 min read 7.9K  
This document walks through the steps to produce a fat APK that includes both x86 and ARM libraries from within the latest Unity 4 or Unity 5 versions.

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

Intel® Developer Zone offers tools and how-to information for cross-platform app development, platform and technology information, code samples, and peer expertise to help developers innovate and succeed. Join our communities for Android, Internet of Things, Intel® RealSense™ Technology and Windows to download tools, access dev kits, share ideas with like-minded developers, and participate in hackathon’s, contests, roadshows, and local events.

Overview

Enabling existing Unity* ARM*-based Android* SDK games with native x86 support is straightforward and easy. This document walks through the steps to produce a fat APK that includes both x86 and ARM libraries from within the latest Unity 4 or Unity 5 versions.

Intel and Unity are working together to bring x86 Android functionality to an upcoming public release of Unity 4.6 and Unity 5. We’ll update https://software.intel.com/en-us/articles/unity when the release goes live. If you desire early access or version 4.5.4, please contact your Intel account manager.

Adding Android* Native x86 Support

In addition to ARM, Unity now provides developers with native x86 support. When you create an Android build using Unity 4 or Unity 5, it automatically creates a fat APK containing both x86 and ARM libraries.

Best practice: Follow Unity programming practices to ensure projects are kept up to date and your Unity software version is the latest. Android SDK and NDK must also be updated to ensure full compatibility.

Step 1

With your project open, click File > Build Settings to open Build Settings (Figure 1).

Image 1

Figure 1. Build settings within the File drop-down menu

Step 2

Within Build Settings, ensure Android is selected, then click Build (Figure 2)

Image 2

Figure 2. Build Settings: ensure Android* is selected, then click Build

Step 3

After clicking Build, specify the save location.

That’s it! Your APK now has native x86 support.

With the use of the both the newest Unity gaming engine and Android SDK/NDK, developers have support for both X86 and ARM concurrently in a fat APK. The resultant APK contains both x86 and ARM libraries, where upon download the device will select which library is applicable for its hardware type. Please note that the fat APK size will have a very small size increase unless full debug information is included. You can make sure that full debug information is NOT included by verifying that "Development Build" is not selected in the build settings section.

A special Unity x86 developer page is available at www.intel.com/software/unity for additional support.

Summary

As you just saw, it’s easy to create Android-based games for the x86 platform using the latest version of Unity 4 or Unity 5. Native x86 support will help your apps have better performance and faster load times.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)