This project is all about giving developers a strong start with one of the most advanced AR platforms the RayNeo X3 Pro smart glasses, powered by the Snapdragon® AR1 Gen 1 chipset for high-performance, on-device AI and AR experiences. From AR enthusiasts to professional creators, these glasses unlock immersive possibilities, offering capabilities that scale from simple augmented interactions to complex spatial applications. The goal of this guide is to help you take the first step confidently: setting up your hardware, configuring the development environment, and exploring AR app development with ease.
Objective
This guide will walk you through setting up your RayNeo X3 Pro smart glasses, configuring the development environment, and building your first AR application using RayNeo OpenXR Unity ARDK. You’ll learn how to connect the glasses via ADB, mirror the display, import SDKs, configure Unity settings, and publish an app that runs on RayNeo glasses. We’ll also share tips, tricks, and useful resources to help you make the most of your AR development experience.
Equipment Required Parts List / Tools
Additional Resources
|
Guide to help with the ADB steps |
|
|
Device Introduction |
https://leiniao-ibg.feishu.cn/wiki/X4nqwAsr6ioAEBklJZIcPfgyn9c |
| Qualcomm Spaces Configuration Tool | Snapdragon Spaces Compatibility Plugin for Android XR |
|
Design Specifications for AR glasses |
https://leiniao-ibg.feishu.cn/wiki/TnHLw4vL4iZgFtkPiMZcxWl8nkb |
|
OpenXR unity ARDK |
https://leiniao-ibg.feishu.cn/wiki/Fpyjw4VOAiRnW9kwZWycvLsJnFf |
|
ARDK for Android |
https://leiniao-ibg.feishu.cn/wiki/FJ5ow2TCri336zkwLpuciIiJn5d |
|
Debugging Tools |
https://leiniao-ibg.feishu.cn/wiki/I9AIwlDciiI5IIkJDvkcX8Lwn1f |
| FAQ | https://leiniao-ibg.feishu.cn/wiki/LG8JwMt3fiL1TIkjtkzcPHJJnFc |
Project walkthrough
Pre-development Preparations
Update the Glasses OS
Version - > Settings ->General -> About Device
For versions of Glass OS above 23.8.29, please use Unity SDK 1.1.2 for development ARDK Download
Glasses Preparation (ADB)
Since the system and interaction of AR glasses differ significantly from mobile phones, while simulated development is possible, the optimal effect is achieved through direct debugging on the glasses, which can resolve many display and compatibility issues.
- Glasses: Prepare an X-series glasses upgraded to the latest OS.
- Development Manual: Read to understand the SDK functions (expanded as shown in the figure for easier reading) Developer manual - Feishu Docs
- ADB Connection: Ensure the glasses are successfully connected to the computer via ADB. The smart glasses support Android ADB commands. For instructions on enabling the required permissions, please refer to: ADB
- Glasses Screen Mirroring to Computer: You can download AnLink (for Windows only) or use Scrcpy for screen - mirroring.
SDK Introduction and Download
1. Because AR glasses need dual-screen closing, touchpad control, glasses sensor data acquisition, AR capability provision, etc., it is necessary to access RayNeoARDK to better present application functions
2. The official currently only supports two SDKs, Android and Unity (i.e. RayNeo ARDK). Please choose according to the application function.
3. OpenXR Unity ARDK OpenXR unity ARDK Download SDK
4. Unity provides AR capabilities such as 3DOF, SLAM, and plane detection, making it more suitable for application scenarios with spatial effects.
a. Samples in the documentation include example codes for most capabilities; if a capability is not mentioned, it cannot be provided via ARDK for the time being.
b. For data like audio, camera, and gyroscope, Android native APIs can be used directly.
c. All-in-one glasses have high power consumption requirements; please control the app's running power consumption as much as possible.
d. Partial low-power capabilities of AR tools like Vuforia can be used on X2, but overall usage is limited by temperature and power consumption; not recommended.
OpenXR unity ARDK
In the Unity engine to create a basic AR scene, and publish the scene as an application that can run on RayNeo glasses.
The Unity version used in this guide is as follows:
- The Unity Editor version for X3Pro SDK is 2022.3.36f1.
Recommended Unity Editor Versions:
- For X3Pro SDK: Unity Editor 2022.3.36f1c1
Other tested compatible versions:
- 2020.3.20LTS and above
- 2021.3.0LTS and above
- 2022.2.0 and above
- 2023.1.0 and above
Installing Unity Editor
You can use the free or professional version of Unity Editor to develop AR applications. Beginners may want to first refer to the mandatory information in the Unity User Manual.
Steps to install Unity Editor:
1. Go to the Unity download page.
2. Download and install Unity Hub.
3. Launch Unity Hub.
4. From the left navigation window, select **Installs**.
5. In the Installs window, click **Install Editor**.
6. Locate the target Unity Editor version and click **Install**.
7. In the Add modules window, check Android SDK & NDK Tools and **OpenJDK**. (It is recommended to check all options under Android Build Support to help configure the environment required for Android development.)
8. Click **Continue**.
9. Read the terms and conditions, then check **I have read and agree to the above terms and conditions**.
10. Click **Install**.
11. Unity Editor will install with Android support.
Creating a New Project
- Open Unity Hub.
- Click New Project in the upper right corner. If you have multiple Unity versions installed, click the editor version at the top and select 2020.3.0 or a higher version.
Select **3D**, enter the project name and location, then click **Create Project**.
Importing ARDK and Configuration
Import via Download
Import Steps:
1. Create an empty Unity project.
2. In the project, go to **Windows > PackageManager**.
3. Select the package.json in RayNeo ARDK and open it.
Steps After Import
1. After importing Rayneo ARDK, a prompt will appear about using the new input system events.
Select Yes and wait for the project to restart.
Configuration Settings (Important)
This section helps you optimize program performance and quality, and use Rayneo ARDK features to simplify basic development settings. We recommend applying these settings as described in this guide.
Setting the Target Platform
1. In the menu bar, go to **File > Build Settings**.
2. Under **Platform**, select **Android**.
3. Click **Switch Platform**.
Note: Select Development Build for testing and debugging. Clear the selection when ready for a release build, as it may affect application performance
General Settings
1. In the menu, go to **Edit > Project Settings > Player**, then expand the Other Settings tab.
2. Under Identification in the Other Settings tab, check Override Default Package Name and fill in the package name.
3. Go to **Project Settings > XR Plug-in Management**, check OpenXR and **RayNeo XR feature group**.
4. Click the red exclamation mark next to OpenXR to enter parameter settings, then select **Fix All**.
Required Configuration (Mandatory Reading)
Configure AndroidManifest.xml
This configuration determines whether the app starts correctly; otherwise, it will be recognized as a "mobile app" at startup, requiring a ring or mobile ray connection.
- In the menu, go to **Edit > Project Settings > Player**, then expand the Publish Settings tab.
- Under Build in the Publish Settings tab, check **Custom Main Manifest**.
You can then find the automatically generated AndroidManifest.xml in **Unity > Project > Plugin > Android**
3. Modify the AndroidManifest.xml file: The SDK defines UnityOpenXrActivity as the launch activity.
Set the launch activity to com.rayneo.openxradapter.UnityOpenXrActivity.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.rayneo.openxradapter.UnityOpenXrActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="com.rayneo.mercury.app" android:value="true" />
</application>
</manifest>
Head Control Mode Selection
Currently, head control supports three modes, and you must select one corresponding mode when calling the respective capability.
- SLAM Mode: Applicable to functions such as 6DoF (Six Degrees of Freedom), face detection, and plane detection.
- DOF3: Applicable to conventional 3DoF (Three Degrees of Freedom).
- DOF_WITH_ABSOLUTE_ORIENTATION: Applicable to the 3DoF + magnetometer binding function.
How to Configure
- Navigate to the settings of BuildSettings -> XR Plug-in Management -> OpenXR -> RayNeoSupport.
- Set Camera Attitude Type to the corresponding mode, and the application will automatically respond when launched.
Importing ARDK and Configuration - Feishu Docs
ARDK Download - Feishu Docs
Import Steps:
1. Create an empty Unity project.
2. In the project, go to **Windows > PackageManager**.
3. Select the package.json in RayNeo ARDK and open it.
Steps After Import
1. After importing Rayneo ARDK, a prompt will appear about using the new input system events.
Select Yes and wait for the project to restart.
Configuration Settings (Important)
This section helps you optimize program performance and quality, and use Rayneo ARDK features to simplify basic development settings. We recommend applying these settings as described in this guide.
Setting the Target Platform
1. In the menu bar, go to **File > Build Settings**.
2. Under **Platform**, select **Android**.
3. Click **Switch Platform**.
Note: Select Development Build for testing and debugging. Clear the selection when ready for a release build, as it may affect application performance
General Settings
1. In the menu, go to **Edit > Project Settings > Player**, then expand the Other Settings tab.
2. Under Identification in the Other Settings tab, check Override Default Package
3. Go to **Project Settings > XR Plug-in Management**, check OpenXR and **RayNeo XR feature group**.
4. Click the red exclamation mark next to OpenXR to enter parameter settings, then select **Fix All**.
Required Configuration (Mandatory Reading)
Configure AndroidManifest.xml
This configuration determines whether the app starts correctly; otherwise, it will be recognized as a "mobile app" at startup, requiring a ring or mobile ray connection.
1. In the menu, go to **Edit > Project Settings > Player**, then expand the Publish Settings tab.
2. Under Build in the Publish Settings tab, check **Custom Main Manifest**.
You can then find the automatically generated AndroidManifest.xml in **Unity > Project > Plugin > Android**
3. Modify the AndroidManifest.xml file: The SDK defines UnityOpenXrActivity as the launch activity.
Set the launch activity to com.rayneo.openxradapter.UnityOpenXrActivity.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.rayneo.openxradapter.UnityOpenXrActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<meta-data android:name="com.rayneo.mercury.app" android:value="true" />
</application>
</manifest>
Head Control Mode Selection
Currently, head control supports three modes, and you must select one corresponding mode when calling the respective capability.
- SLAM Mode: Applicable to functions such as 6DoF (Six Degrees of Freedom), face detection, and plane detection.
- DOF3: Applicable to conventional 3DoF (Three Degrees of Freedom).
- DOF_WITH_ABSOLUTE_ORIENTATION: Applicable to the 3DoF + magnetometer binding function.
How to Configure
1. Navigate to the settings of BuildSettings -> XR Plug-in Management -> OpenXR -> RayNeoSupport.
2. Set Camera Attitude Type to the corresponding mode, and the application will automatically respond when launched.
Importing the Sample
1. Optional: Import the sample scenes in the SDK.
2. Add all scenes under Scenes to Build Settings.
Remove the scene without OpenXR. There would be 13 selected scenes.
3. After packaging and installing, manually grant camera permissions
4. Configure AndroidManifest.xml (refer to the previous configuration steps).
Sample Operations
1. In the Entry scene, double-click the temple to initialize the camera angle
2. In the sub-scene, double-click the temple to return to the SampleMain scene.
3. In the Lattice scene, you must select Return to Main Interface and click to return to the SampleMain scene.
Build Your First XR Application
This tutorial helps you build your first XR application in Unity. It is a basic application that introduces the main Unity concepts, such as 3D objects, components, and build settings.
Adding the XR Plugin Prefab
1. Create a new scene and delete the Main Camera and **Directional Light**.
2. Navigate to Packages /RayNeo OpenXR ARDK/SDK/Runtime/Resources/Prefab and drag the XR Plugin **prefab into the scene**.
3. The XR Plugin contains the following elements:
Element |
Description |
XR Plugin |
Main object |
LaserBeam |
Ray control unit corresponding to the camera |
BeamGraphic |
Ray renderer that visualizes the ray's position in space (can be disabled) |
LaserBeamDot |
Interaction point where the ray collides with objects |
Head |
Camera control unit for 3DoF head tracking |
4. Set the Game view resolution: In the Game view, add a new resolution of 640x480 (adjust based on your device).
Adding Buttons and Input Fields
1. Create a button:
In the Hierarchy window, right-click > **UI > Legacy > Button**.
2. Configure the Canvas:
3. Select the **Canvas**, set Render Mode to **World Space**, and set the RectTransform Pos property to **(0, 0, 1000)**. Adjust the button properties as shown:
4. Remove the default Graphic Raycaster from the Canvas and add XRGraphicRaycaster.
Building and Running the Application
1. Add the current scene to Scenes In Build and click **Build And Run**. Wait for the process to complete.
2. Expected results:
- Stereoscopic rendering should work correctly in **scrcpy**.
- 3DoF head tracking should function properly.
- Clicking the temple should trigger button events.
This completes the basic setup for your first XR application in Unity using RayNeo ARDK.
