3 Development notes¶
3.1 Enable device USB Debugging on device¶
USB Debugging is enabled by default. If it is not open, you can refer to our developer platform online documentation at: http://static.appstore.picovr.com/docs/FAQ/chapter_two.html#q2-how-to-enable-usb-debugging
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
Add the necessary permissions
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.INJECT_EVENTS" />
3.3 Unity Project Settings recommended 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
3.4 LWRP configuration instructions¶
For example,In Unity 2019.1.0f2.
Open Window/Package Manager
Figure 3.5 Window toolbar
Select Show preview packages
Figure 3.6 The advanced option of Packages
Under “Render-Pipelines.Lightweight”, click Install in the lower right corner
Figure 3.7 Install the LWRP
Create LightweightRenderPipelineAsset in the assets directory
Figure 3.8 Create LWRP Asset
Drag and drop the file created in step 4 to Scriptable Render Pipeline Setting field in Project Setting/Graphics
Figure 3.9 Use LWRP Asset
Replace materials in the project with LWRP materials
Figure 3.10 Update materials in the project