The Unity VR porting process

In this section of the guide, we show you how to port an application or game to native Unity VR. This is a multi-stage process. Follow these steps:  

  1. Install a recent version of Unity. The most up to date version is best; Unity 5.1 is required for native VR support; 2018.3 adds significant support including when targeting multiple VR platforms.
  2. Install the appropriate SDK for each device that you would like to be supported. Devices may also need a signature file that you can download from the relevant website. Place the signature file in the required folder on your device.
    For example, the Samsung Gear VR that runs the Ice Cave demo needs a signature file from the Oculus developer website. The signature file for a Samsung device must go in the Plugins/Android/assets folder. Configure the relevant Oculus SDK. Use SDK Suite 1.41 or earlier - Gear support has ended in the most recent Oculus SDK.
    Note: From Unity 2018 onwards, you could use the Experimental VR Lightweight Render Pipeline, but more recent versions want the Universal Render Pipeline.
  3. Enable Virtual Reality support in Edit > Project Settings > Player > XR Settings.
    Note:Currently Unity does not support Vulkan with VR, so set your Graphics API to OpenGL ES3.
    The following screenshot shows the Player Settings window:

  4. Set up the camera. Most VR systems have a Prefab set up that you need to add. You also need to remove the default Main Camera.
  5. Enable the Developer options menu for Android devices and turn on USB debugging. The following screenshot shows the Developer options menu:

  6. Build the application, connect the device, and choose to run on the device in Unity.
  7. Launch the application.
Enable Samsung Gear VR developer mode

When you launch the application on a Samsung device, it prompts you to insert the device into the headset. If the device is not ready for VR, it prompts you to connect to the network to download the Samsung VR software. Samsung Gear VR developer mode can help you to visualize the VR application that is running, without inserting the device into the VR headset.

Samsung Gear VR Developer mode can be enabled if you have already installed a signed VR application. If you have not installed a signed VR application, install a signed VR application so that you can enable this mode. To enable developer mode:

  1. On the Samsung device, select Settings > Application Manager > Gear VR Service.
  2. Select Manage Storage.
  3. Tap on the VR service version six times.
  4. Wait for the scan process to complete. A developer mode toggle appears.

Note: Using developer mode reduces the battery life of the phone. This is because it overrides all the settings that turn off the headset when it is not in use.

The following figure shows an example Ice Cave screenshot from the Samsung Gear VR developer mode view:

Previous Next