The Daydream View VR headset is no longer available for purchase as of October 15, 2019. As of November 2023, previously supported devices will no longer be able to download and install Google VR Serivces (Android application ID com.google.vr.vrcore) for new users.
Getting started with experimental 6DoF controllers in Unity
Stay organized with collections
Save and categorize content based on your preferences.
This guide gives you high-level instructions for setting up Google VR
development with Unity and building a demo Daydream app that works with the
experimental 6DoF controllers and faceplate
for the Lenovo Mirage Solo with Daydream.
Fluorescent lighting and HTC Vive Lighthouses are both known to interfere with
tracking. Turn off the Vive Lighthouse if you have one, or move to a room
with different conditions.
Beta APIs
Getting started with the experimental 6DoF controllers
Hello6DoFControllers demo scene
The Hello6DoFControllers demo scene included in the SDK demonstrates new
experimental 6DoF controller features:
Demonstrates use of two controllers. The DemoInputManager script switches
the laser pointer to the controller on button down of TouchPadButton,
Trigger, Grip, or App.
The DemoObjectController6DoF component demonstrates usage of the
experimental 6DoF controller's grip button to "grab" a floating object.
The GvrBetaControllerPointer prefab uses the
GvrBetaControllerVisualMulti component to switch controller meshes at
runtime and change controller transparency based on positional tracking
status.
Player Settings > XR Settings > Virtual Reality Supported
Enabled
Player Settings > Other Settings > SDKs
Click + and select Daydream
Player Settings > Android > XR Settings > Virtual Reality SDKs > Daydream > Positional Head Tracking
Required
Player Settings > Other Settings > Minimum API Level
Android 7.1.1 'Nougat' (API level 25) or higher or higher
Player Settings > Other Settings > Package Name
Your app's package identifier
Import the Google VR SDK for Unity (GoogleVRForUnity_*.unitypackage) that
you downloaded above into your project.
In Unity, open the
GoogleVR/Beta/Demos/Hello6DoFControllers/Scenes/Hello6DoFControllers scene.
Verify that the Build Settings > Scenes in Build list is either empty, or
contains only the currently open Hello6DoFControllers scene.
Build and Run the app on your device.
Experimental 6DoF controller button mapping
For experimental 6DoF controllers, each button is mapped to either
InputButton.Left or InputButton.Right. As such, only TouchPadButton and
Trigger will trigger UI component pointer events:
Controller button
Triggers UI component pointer events?
PointerEventData.button returns
TouchPadButton
Yes
InputButton.Left
Trigger
Yes
InputButton.Left
App
No
InputButton.Right
Grip
No
InputButton.Right
Controller emitted pointer events
Pointer events are handled differently, depending on whether you are using a
Daydream (3DoF) controller or experimental 6DoF controller.
PointerEventData generated by Daydream (3DoF) controllers and experimental
6DoF controlers is of type GvrPointerEventData and contains additional event
information exposed through PointerEventData extension methods:
GvrGetButtonsDown() returns the GvrControllerButton mask of buttons that
went down to trigger the event
GvrGetControllerInputDevice() returns the GvrControllerInputDevice that
triggered the event
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThis guide provides instructions for setting up Google VR development with Unity, focusing on building a demo Daydream app compatible with experimental 6DoF controllers for the Lenovo Mirage Solo.\u003c/p\u003e\n"],["\u003cp\u003eThe setup requires a Lenovo Mirage Solo with Daydream, 6DoF controllers, Unity 2017.4 or newer with Android Build Support, and the latest GoogleVRForUnity package.\u003c/p\u003e\n"],["\u003cp\u003eThe included Hello6DoFControllers demo scene showcases features like dual controller usage, object grabbing with the grip button, and dynamic controller visualization.\u003c/p\u003e\n"],["\u003cp\u003eBeta APIs used in this guide are subject to change and may be removed without warning in future releases.\u003c/p\u003e\n"],["\u003cp\u003eController button mapping and pointer event handling differ between Daydream (3DoF) and experimental 6DoF controllers, detailed information is provided for developers.\u003c/p\u003e\n"]]],["This guide details setting up Google VR development in Unity for a Daydream app using experimental 6DoF controllers on a Lenovo Mirage Solo. Key actions include: installing Unity 2017.4+ with Android support, downloading the Google VR SDK, and configuring Unity's build settings (Android platform, VR support, minimum API level). The guide also demonstrates the \"Hello6DoFControllers\" demo scene, illustrating dual-controller use, object grabbing, and mesh switching, and explains how controller buttons map to UI pointer events.\n"],null,["# Getting started with experimental 6DoF controllers in Unity\n\nThis guide gives you high-level instructions for setting up Google VR\ndevelopment with Unity and building a demo Daydream app that works with the\n[experimental 6DoF controllers](/vr/experimental/6dof-controllers) and faceplate\nfor the Lenovo Mirage Solo with Daydream.\n\nSet up your development environment\n-----------------------------------\n\nHardware requirements:\n\n- [Lenovo Mirage Solo](/vr/discover/daydream-standalone) with Daydream\n\n- Experimental Daydream 6DoF controllers\n [developer kit](/vr/experimental/6dof-controllers)\n\nSoftware requirements:\n\n- Unity [LTS release 2017.4](//unity3d.com/unity/qa/lts-releases)\n or newer with **Android Build Support**.\n\n- The latest `GoogleVRForUnity_*.unitypackage` from the\n [releases page](//github.com/googlevr/gvr-unity-sdk/releases).\n\nFor more detailed installation instructions, see\n[Quickstart for Google VR SDK for Unity with Android](/vr/develop/unity/get-started-android).\n\n### Using the controllers after setup\n\nFluorescent lighting and HTC Vive Lighthouses are both known to interfere with tracking. Turn off the Vive Lighthouse if you have one, or move to a room with different conditions.\n\nBeta APIs\n---------\n\n| **Warning:** Beta APIs in the `GoogleVR.Beta` namespace are not subject to the usual deprecation processes. Beta APIs are expected to change and might be removed entirely in a future version without warning.\n\n### Getting started with the experimental 6DoF controllers\n\n| **Note:** For general information about Daydream controller support in Unity, see the [Daydream (3DoF) controller](/vr/develop/unity/controller-support) documentation.\n\nHello6DoFControllers demo scene\n-------------------------------\n\nThe **Hello6DoFControllers** demo scene included in the SDK demonstrates new\nexperimental 6DoF controller features:\n\n- Demonstrates use of two controllers. The `DemoInputManager` script switches the laser pointer to the controller on button down of `TouchPadButton`, `Trigger`, `Grip`, or `App`.\n- The `DemoObjectController6DoF` component demonstrates usage of the experimental 6DoF controller's grip button to \"grab\" a floating object.\n- The **GvrBetaControllerPointer** prefab uses the `GvrBetaControllerVisualMulti` component to switch controller meshes at runtime and change controller transparency based on positional tracking status.\n\nTo try this demo scene:\n\n1. [Create a new Unity project](/vr/develop/unity/get-started-android#create_a_new_unity_project_and_import_the_google_vr_unity_package).\n2. Switch your project's Build Platform to **Android**.\n3. Configure Unity build and player settings:\n\n | Setting | Value |\n |-----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|\n | **Player Settings** \\\u003e **XR Settings** \\\u003e **Virtual Reality Supported** | Enabled |\n | **Player Settings** \\\u003e **Other Settings** \\\u003e **SDKs** | Click **+** and select **Daydream** |\n | **Player Settings** \\\u003e **Android** \\\u003e **XR Settings** \\\u003e **Virtual Reality SDKs** \\\u003e **Daydream** \\\u003e **Positional Head Tracking** | Required |\n | **Player Settings** \\\u003e **Other Settings** \\\u003e **Minimum API Level** | **Android 7.1.1 'Nougat' (API level 25) or higher** or higher |\n | **Player Settings** \\\u003e **Other Settings** \\\u003e **Package Name** | Your app's package identifier |\n\n4. Import the Google VR SDK for Unity (`GoogleVRForUnity_*.unitypackage`) that\n you downloaded above into your project.\n\n5. In Unity, open the\n `GoogleVR/Beta/Demos/Hello6DoFControllers/Scenes/Hello6DoFControllers` scene.\n\n6. Verify that the **Build Settings \\\u003e Scenes in Build** list is either empty, or\n contains only the currently open **Hello6DoFControllers** scene.\n\n7. **Build and Run** the app on your device.\n\n### Experimental 6DoF controller button mapping\n\nFor experimental 6DoF controllers, each button is mapped to either\n`InputButton.Left` or `InputButton.Right`. As such, only `TouchPadButton` and\n`Trigger` will trigger UI component pointer events:\n\n| Controller button | Triggers UI component pointer events? | `PointerEventData.button` returns |\n|-------------------|---------------------------------------|-----------------------------------|\n| `TouchPadButton` | **Yes** | `InputButton.Left` |\n| `Trigger` | **Yes** | `InputButton.Left` |\n| `App` | No | `InputButton.Right` |\n| `Grip` | No | `InputButton.Right` |\n\n### Controller emitted pointer events\n\nPointer events are handled differently, depending on whether you are using a\nDaydream (3DoF) controller or experimental 6DoF controller.\n| **Note:** `PointerDown`, `PointerUp`, and `PointerClick` events do not support multiple simultaneous buttons down. Only the first button to go down will trigger the down event. Additional simultaneous button downs will be ignored until the first button to go down then goes up.\n\n| Controller button | Emitted pointer events Daydream (3DoF) controllers | Emitted pointer events Experimental 6DoF controllers |\n|-------------------|----------------------------------------------------|------------------------------------------------------|\n| `TouchPadButton` | `PointerDown`, `PointerUp`, `PointerClick` | `PointerDown`, `PointerUp`, `PointerClick` |\n| `Trigger` | n/a | `PointerDown`, `PointerUp`, `PointerClick` |\n| `Grip` | n/a | `PointerDown`, `PointerUp`, `PointerClick` |\n| `App` | none | `PointerDown`, `PointerUp`, `PointerClick` |\n\n### Accessing controller specific pointer event data\n\n`PointerEventData` generated by Daydream (3DoF) controllers and experimental\n6DoF controlers is of type `GvrPointerEventData` and contains additional event\ninformation exposed through `PointerEventData` extension methods:\n\n- `GvrGetButtonsDown()` returns the `GvrControllerButton` mask of buttons that went down to trigger the event\n- `GvrGetControllerInputDevice()` returns the `GvrControllerInputDevice` that triggered the event\n\n### Additional documentation\n\n- [Unity User Manual](//docs.unity3d.com/Manual/index.html) and [Scripting API Reference](//docs.unity3d.com/ScriptReference/index.html).\n- [Google VR SDK for Unity Developer docs](/vr/develop/unity/get-started-android) and [API reference](/vr/reference/unity)"]]