# 2. Getting Started

Learn how to import SDK Package and do basic testing for your environment. Prerequisites

  • We assume that you have an understanding of what virtual reality is and the terms it uses. If not, check the Unity glossary.
  • Before using the QIYU VR SDK, we highly recommend that you to read Unity’s XR document, then correctly install the Unity Editor and ADB debugging tools.

# Step 1:

Open Unity Editor, and create a new 3D project

img

# Step 2:

Modify the platform to the Android platform

# Step 3:

  • Import QIYU XR Plugin

Menu -> Window -> PackageManager, Click Add -> Add package from disk,Select package.json, and import the Plugin.

  • Import QIYU Platform SDK

If the applications will live on the QIYU store, The QIYU Platform SDK must be imported after importing QIYU XR Plugin. Otherwise, the application will be refused when uploading to QIYU platform. Please refer to the QIYU Platform SDK (opens new window).

# Step 4:

Click "Yes" after import SDK, and Enable "Unity new input System". Then, Unity Editor will restart. Please just wait a moment.

# Step 5:

After importing, QIYU XR Plugin will be displayed in "Package Manager". Click "Import into Project" to import the Sample project and refer to the various functional usages provided by the SDK.

(If no error is reported in the Unity Editor after importing the Sample, please ignore this note) If your project uses XR Interaction Toolkit version 2.0 or higher and you have imported the QIYU XR Samples, Unity Editor may prompt an error in the BoundaryTest.cs script saying "trackingOriginMode is undefined". This is because the XRRig property "trackingOriginMode" has been renamed to "currentTrackingOriginMode". Please manually edit the code as shown in the picture below.

# Step 6:

Create a new scene, and create a XRRig gameobject. Please refer to the 4.2.1 UnityXR (opens new window).

Note:

● XRRig will override the default MainCamera in a new scene.

● The Qiyu SDK defaults to match XR Interaction Toolkit (opens new window) v1.0. If version 2.0 or higher is used in the project, XRRig is renamed to XROrigin.

# Step 7:

Enable "QIYU" in ProjectSettings—>XRPlug-in Management is required.

img

# Step 8:

Click "Menu/QIYU/Modify Player Settings", and it can be set to the recommended configuration automatically.

Configuration Recommended Value
GraphicsAPIs OpenGLES3
ApiCompatibilityLevel .NET 4.x
minSdkVersion AndroidApiLevel26
Scripting Backend IL2CPP
Target Architectures ARM64(It is required when uploading the released version to QIYU store)
Default Orientation LandscapeLeft
vSyncCount Every V Blank
Blit Type Always

# Step 9 (Optional):

If you need a custom AndroidManifest.xml file, click "QIYU->Tools->Create AndroidManifest" to create a default xml file and modifies it. When not needed, you can click the Delete button to Delete the file.

Note: If your application cannot appear in library of QIYU Device, please adding the following codes into AndroidManifest.

<category android:name="android.intent.category.LAUNCHER" /> 

# Step 10:

Build and Run on QIYU Device. If your application has been already released on QIYU APP store, the Bundle version code of the updated application must higher than the one's in the store, please refer to FAQs (opens new window).