4 Quick Start of SDK Access

Step1: Create a new Project

The blueprint and C++ project can be selected when creating a new project, and the blueprint Blank project template can be used as an example:

_images/4.1.png

Figure 4.1 New project creating

Please be sure to ensure that the target hardware is: Mobile/Tablet, the target image level is: Scalable 3D or 2D. In addition, the project name and project path should not be in Chinese.

Step2: Set project

In order to be compatible with our SDK, the project should be set, including the following points:

  1. Set the project’s Editor Start Map and Game Default Map: That is, keep the current map, then go to Edit->Project Setting->Project->Maps and Modes, and set the project’s Editor Start Map and Game Default Map as the previously maintained map.

_images/4.2.png

Figure 4.2 Map setting

  1. Clear the default virtual key: Go to Engine->Input->Mobile and clear the Default Touch Interface.

_images/4.3.png

Figure 4.3 Game clearing default virtual key

  1. Go to Platforms->Android->APKPackaging, and check Enable FullScreen Immersive on KitKat and above devices.

_images/4.4.png

Figure 4.4 System hiding virtual key

  1. Set the SDK and NDK versions of the Android platform: Go to Platforms->Android and set the Minimum SDK Version and Target SDK Version as 19 or higher;

_images/4.5.png

Figure 4.5 SDK version setting

  1. Go to the Platforms->Android SDK, set the SDK API Level as matchndk, and set the NDK API Level as android-19 or higher.

_images/4.6.png

Figure 4.6 NDK version setting

  1. Close the Plugins that conflict with the SDK: Go to Edit->Plugins, uncheck all items under Built-in / Virtual Reality and all items under Built-in /Input Devices. At this point, the editor will send a restart prompt, and we should only close the editor directly.

Step3: Import SDK

Be sure to keep the editor closed and copy the extracted Plugins directory to the root directory of the project:

_images/4.7.png

Figure 4.7 Import SDK into the directory

Then double click the project name and reopen it. If it is UE4.20+, it will prompt that the SDK module is not compiled, and it will be successful after “Yes” is clicked:

_images/4.8.png

Figure 4.8 Uncompiled prompt

After the project is opened, our plug-in can be viewed under the Plugins page:

_images/4.9.png

Figure 4.9 Pico-related plug-in

Step4: Project completion

  1. Create a new Pawn blueprint class, add a Scene component to its DefaultSceneRoot assembly, and then create a new Camera component under the Scene component:

_images/4.10.png

Figure 4.10 Pawn component structure

After being packaged and mounted to the helmet, the relative position/ orientation of the Camera will be refreshed in real time according to the helmet, so that the head tracking and stereo rendering can be completed.

  1. Drag the Pawn into the scene and set its Auto Possess Player device as Player0:

_images/4.11.png

Figure 4.11 Drag the Pawn into the Scene

Step5: Project packaging

The texture compression format supported by Pico Neo and Pico Goblin series is ASTC, therefore, Android (ASTC) needs to be selected when the project is packaged. The specific packaging process is: In the editor, execute File -> Package Project -> Android -> Android (ASTC) , and then the packaging can be completed (in order to package the data into apk, it is recommended to enter “Project Settings” first, and then check the “Package game data inside” in Android which is a sub-item of Platforms. apk? “):

_images/4.12.png

Figure 4.12 Packaging process

After packaging, double click “Install_Project name_Compile configuration-armv7-es2.bat for installation”:

_images/4.13.png

Figure 4.13 Apk Installation