Quickstart for Android
Start developing your NRSDK Unity apps on Android.
This quickstart guide will help you set up your development environment and test out the sample app “Hello MR” on NRSDK.
A Nreal Computing Unit (Think of it as an Android phone with no screen, so all development processes will be very similar to mobile app development.)
A pair of Nreal Light glasses
Don’t have an Nreal device? Sign up for the Nreal Developer Kit! A Testing Tool will be released with the next version of NRSDK to pilot Nreal app functions without Nreal Light glasses and computing unit.
A USB-C cable to connect the Nreal computing unit to your PC
Wi-Fi connection is not necessary. However, a Wi-Fi Android Debug Bridge (adb) connection can be used to debug and test.
Unity 2018.2.X with Android Build Support
Download NRSDK for Unity 1.0.0
The SDK is downloaded as
Android SDK 7.0 (API Level 24) or later, installed using the SDK Manager in Android Studio
Creating a Unity Project
Open Unity and create a new 3D project.
Player Settings > Other Settings > Scritping Runtime Versionto
.net 4.x Equivalent
Import NRSDK for Unity
Select Assets > Import Package > Custom Package.
NRSDKForUnity_1.0.0.unitypackagethat you downloaded.
In the Importing Package dialog, make sure that all package options are selected and click Import.
Hello MR - Your First Sample App
Find the HelloMR sample app in the Unity Project window by selecting
Assets > NRKernal > Examples > HelloMR > Scenes > HelloMR.
Configure Build Settings
- Go to File > Build Settings.
- Select Android and click Switch Platform.
- In the Build Settings window, click Player Settings.
- In the Inspector window, configure player settings as follows:
|"Landscape Left" when using an Nreal Light computing unit , “Portrait”when using a smart phone|
|Create a unique app ID using a Java package name format. For example, use com.nreal.helloMR|
|Android 4.4 or higher|
|Android 7.0 or higher|
Connect to Nreal Device
Enable developer options and USB debugging on your computing unit. Android Debug Bridge (adb) is enabled as default and does not require manual setting).
Connect your computing unit to your Windows PC.
Build and Run
In the Unity Build Settings window, click Build. Install your app through WiFi Android Debug Bridge (adb) after the build is successful.
Disconnect the computing unit with your PC, and then connect it to the glasses.
Launch you app along with the Nreal Light controller. For instructions on how to use the Nreal Light controller, please see the Controller Guide.
Move around until NRSDK finds a horizontal plane and the detected plane will be covered with green grid.
Click the Trigger button to put an Nreal logo object on it.
(Optional) Use Android Logcat to view logged messages. We recommend using WiFi Android Debug Bridge (adb) to connect to your PC so that you do not have to be connected through the data cable most of the time.
- Use Image Tracking to build apps that can detect and track multiple images in the physical environment.