Get started with building your Android apps using AR Foundation.
About AR Foundation
AR Foundation is Unity's high-level, cross platform API to support Augmented Reality. AR Foundation lets you write your app once, and build for either Android or iOS.
Using ARCore Extensions for AR Foundation to build for Android requires the following hardware and software.
An ARCore supported Android device
A USB cable for connecting your device to your development machine
Android SDK 7.0 (API Level 24) or later, installed using the SDK Manager in Android Studio
JDK 9 is not currently supported by Unity. Please use JDK 8.
The following Unity packages are required, they will be installed automatically by the Unity package manager's dependency management system when you install the ARCore Extensions package in the next step if they are not already installed:
AR Foundation package version 4.1.0-preview.5.
ARCore XR Plugin package version 4.1.0-preview.5.
You may encounter compatibility issues if you do not use these versions.
Get the ARCore Extensions package
The ARCore Extensions for AR Foundation package is available from GitHub:
Download the latest
arcore-unity-extensions-*.tgzfrom the GitHub releases page.
Extract the downloaded archive to a local folder. Make sure it's a location that is convenient -- after you install the package into your project, you won't be able change the folder's location or contents without first uninstalling the package. You may reinstall the package after changing the folder location.
Create a new project and import the ARCore Extensions package
Open Unity and create a new 3D project.
To import the ARCore Extensions package downloaded from GitHub into your project, follow these steps:
Open the Package Manager (choose Window > Package Manager).
In the top left corner of the Package Manager, click the + (plus) button. Choose Add package from disk…
Locate the local folder where you unzipped the archive, and select the
package.jsonfile, then click Open.
Wait a moment while Unity installs this and dependent packages into your project.
Configure project settings
- Go to File > Build Settings to open the Build Settings window.
- Select Android and click Switch Platform.
- In the Build Settings window, click Player Settings.
- In the Settings window, configure the following:
Setting Value Player Settings > Other Settings Uncheck Multithreaded Rendering Player Settings > Other Settings > Rendering Uncheck Auto Graphics API
If Vulkan is listed under Graphics APIs, clear it.
Player Settings > Other Settings > Package Name Create a unique app ID using a Java package name format.
For example, use
Player Settings > Other Settings > Minimum API Level Android 7.0 'Nougat' (API Level 24) or higher
(For AR Optional apps, the Minimum API level is 14.)
- Go to Edit > Project Settings and click XR Plug-in Management.
- Select Android and click ARCore under the Plug-in Providers table.
- Try out the Cloud Anchors codelab.
- Review Runtime Considerations.
- Review Design Guidelines.
- Review Cloud Anchors developer guide for ARCore Extensions.