Before you do anything, make sure you have at least Unity 2018.3 and all the software downloaded and installed. ARCore is only a unitypackage, the rest are installers.
Android Studio: https://developer.android.com/studio
NDK: https://developer.android.com/ndk/downloads
After downloading and installing everything, open up Unity and create a new project. Then, go to "Edit" > "Preferences" to bring up a new window. Click on the "External Tools" tab and under the "Android" and "SDK", click browse. The Android SDK should be saved to the same location, so Unity should be able to easily find it.
Usual path of the SDK: C:\Users\<your_user>\AppData\Local\Android\sdk
A similar section titled "NDK" is right below, which also needs to be filled out. Depending on where you saved Android Studio, you might have trouble locating the Native Development Kit (NDK). Typically, it is located inside the Android Studio folder like so: Android_Studio\plugins\android-ndk. Simply locate and get the full path.
Example path: D:\Programs\Android_Studio\plugins\android-ndk
Downloads
ARCore for Unity: https://developers.google.com/ar/develop/downloadsAndroid Studio: https://developer.android.com/studio
NDK: https://developer.android.com/ndk/downloads
Linking the SDK and NDK
After downloading and installing everything, open up Unity and create a new project. Then, go to "Edit" > "Preferences" to bring up a new window. Click on the "External Tools" tab and under the "Android" and "SDK", click browse. The Android SDK should be saved to the same location, so Unity should be able to easily find it.
Usual path of the SDK: C:\Users\<your_user>\AppData\Local\Android\sdk
A similar section titled "NDK" is right below, which also needs to be filled out. Depending on where you saved Android Studio, you might have trouble locating the Native Development Kit (NDK). Typically, it is located inside the Android Studio folder like so: Android_Studio\plugins\android-ndk. Simply locate and get the full path.
Example path: D:\Programs\Android_Studio\plugins\android-ndk
The "Preference" panel where you can link the SDK and NDK path |
Importing ARCore
In the top menu, click on "Assets" > "Import Package" > "Custom Package...". This will open up a file browser, where you can find and select the unitypackage. The unitypackage should look like arcore-unity-sdk-<version_number>.
Adjusting Build Settings
In the top menu, click on "File" > "Build Settings". This will bring up a new window. Under the "Platform" section, click on "Android". On the bottom right side, click on the button labeled "Switch Platform", this will switch the default platform from "PC, Mac & Linux Standalone" to "Android". After Unity finishes switching the platform, on the bottom left-hand corner, clicking on the button "Player Settings..." will open up the "Player Settings" in the inspector tab. Change the Company Name and Product Name fields. If you already have an icon, this is where you can change your default icon, or, for more control, under the "Icon" tab below. Click on the "Other Settings" tab, and under "Identification", change the Package Name to com.<your_company/group>,<your_app_name>. In the top bar, now you can go to "File" > "Build And Run".Player Settings in the Inspector tab |