Setting up Google VR in Unity
A Quick-start for setting up Google VR (GVR) in Unity3D
1. Project Set Up
Setup a generic 3D Unity Project, refer below article if required
2. Download the GVR package
Download the latest GoogleVRForUnity_*.unitypackage from the releases page.
3. Import Package to project
4. Setting up the Scene
Easiest way to get started is to
- Duplicate the GoogleVR/Demos/Scenes/HelloVR Scene and move it to your own Scenes folder.
- Delete DemoSceneManager, DemoInputManager, CubeRoom, Pointlight and Treasure from the scene
You can also delete GvrInstantPreview and GvrEditorEmulator if you don’t need Instant preview or the Editor Emulator respectively.
So now you have an empty scene which has the support to detect 3DOF head movement to orient the camera and interact with the Unity’s event system via gaze.
- Feel free to add your own environment and interactable to the scene. Objects in the scene are marked as interactable if the object has an EventTrigger Component attached to them.
5. Building the App
Add your scene and switch platforms to Android
Open Player Settings > Other Settings, Remove Vulkan Graphics API add your Package Name and set the Minimum API Level to 19 or above
In Player Settings > XR Settings, select Virtual Reality Supported and add at least one of the VR SDKs that you need.
Finally connect your device and Build and Run your App