3 Development notes¶
3.1 Enable device USB Debugging on device¶
Please check details from this FAQ link on how to enable developer https://sdk.picovr.com/docs/FAQ/chapter_one.html
3.2 Android Manifest Document¶
- Special meta-data needs to be added; otherwise, an exception will be displayed::
<meta-data android:name=" pvr.app.type " android:value="vr"/>
<meta-data android:name=" pvr.display.orientation " android:value="180"/>
- All activity that needs to be displayed needs to inherited from
com.unity3d.player.UnityPlayerNativeActivityPico
- Add the necessary permissions
<!--The following permissions are required-->
<!--For SDK basic APIs-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--The following permissions are optional-->
<!--Required by Globin series controller APIs, optional if the app targeting Neo 2 and Neo 3 series-->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.INJECT_EVENTS" />
<!--Payment-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--Vibrate-->
<uses-permission android:name="android.permission.VIBRATE"/>
<!--Set screen brightness -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<!--Change language-->
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
3.3 Recommended SDK Configuration¶
- For Color Space, Gamma and Linear are both supported.
If Linear is selected, then Blit Type needs to be set as “Never”, otherwise Unity will create a buffer unrelated to the display, which will cause some display errors when the build is run.
If Gamma is selected , you can select Never or Always in Blit Type.
Figure 3.1 Setting of Blit Type
- Graphics APIs do not support Vulkan for the time being. For OpenGLES2 and OpenGLES3, the developers need to choose according to their needs.
- Multi-thread rendering is supported, Refer to the Unity official document for details: (https://docs.unity3d.com/ScriptReference/SystemInfo-graphicsMultiThreaded.html)
Figure 3.2 Setting of rendering
- In Default Orientation under Unity Player Setting, select Landscape Left (Required)
Figure 3.3 Setting of Default Orientation
- Check the setting of V Sync Count, and the specific steps are as follows: Enter Edit>Project Settings>Quality,Medium and apply settings pictured below under Levels, and ensure that V Sync Count under Other is Don’t Sync (Required):
Figure 3.4 Set V Sync Count to Don’t Sync
Requirements for setting API level:
Minimum API Level: 23 - 27
Target API Level: 27 is recommended. See chapter 2.2 for details.
Figure 3.5 Setting API Level