The development environment has been configured in the previous section. This section mainly talks about Unity and engineering related things.
First open Unity, import the demo scene from the previous section into Unity, or open it directly. Because the configuration of the demo scene is already set. So as long as you connect the vive device and turn on the steamVR plug-in, you can start VR directly.
Whether you can enable vive on your PC, you only need to see whether the steamVR panel shows that the unity scene is running. When the scene can be run in the unity editor environment, it will be directly packaged into an exe file and run without any problems.
At this time, pay attention. The official recommendation is that we install Input Helper, XR Tracking, Oculus XRPlugin, MockHMD Plugin and other plug-ins on the ProjectSetting interface, which can be ignored here. Because I tried to install Input Helper, XR Tracking, Oculus XRPlugin, and MockHMD Plugin. Although no error was reported, it is normal for the packaged apk to be released to Quest, but after the editor interface or the windows version was released I can't enable the Vivie device. I don't know if it is a bug in the XR Interaction plug-in itself or I have misconfigured it. If it is installed, I can still enable steamVR. I hope I can reply and ask. . . In short, if you are here, just run the default project first.
To publish the scene to Quest, you also need to configure ProjectSetting. The first is to check Virtural Reality Supported under XRSetting. If you don’t check it, the packaged apk can be considered by Quest as a normal app and will not enable the VR function, as shown in the figure below
In addition, you also need to rehabilitate the Quest SDK on the Virtual Reality SDKs, and check the Quest too
The last option, Stereo Rendering Mode, must be Single Pass. Otherwise, whether it is on the PC or Quest, it is possible that only one eye can display the screen, and the other is a black screen. When the settings are configured correctly, the VR scene can be run normally on the Quest side.
Several demos that come with the project can run normally, because I use the universal rendering pipeline URP. If I switch to it, the default scene will turn purple but it will not affect the operation. Just give the urp shader in the package to It can be displayed normally in the scene.
This is the end of the test for the two VR environments of PC and Android. The next section will simply create a VR scene and explain the details of a compatible processing between PC and Android.