How to run DayDream Controller from Unity Editor?

3.3k views Asked by At

I am developing a DayDream app and working with a Pixel XL and real DayDream Controller (on a MacBook Pro). I would really like to be able to test with the DayDream Controller when running the app from Unity Editor. Currently, I am forced to make a build for every little change and its killing me (slow).

I believe that I can do this by connecting my Pixel XL via USB cable to my Mac and then using adb to configure it. But, all attempts have failed so far.

4

There are 4 answers

0
diesersamat On

I don't know about real Daydream Controller, but you can try using your phone as DayDream Controller Emulator.

As it said here, you should download emulator APK from here, install it and run on phone connected to WiFi. In your Unity project find GvrControllerMain and change Emulator Connection Mode to Wi-Fi. Also find Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorConfig.cs and change line to IP address displayed on daydream controller emulator app on phone.

// IP address of the phone, when connected to the PC via WiFi.
public static readonly string WIFI_SERVER_IP = "192.168.0.78";//"192.168.43.1";

Click "Play" in Unity, it should work.

0
Bradley Pizzimenti On

At Google I/O 2017, the Daydream team announced instant-preview which supports a "headless" controller-only mode.

The repo is on github: https://github.com/googlevr/gvr-instant-preview

The moment in the Daydream keynote where it is mentioned is here: https://youtu.be/tto90e-DfeM?t=26m45s

0
Joe Campbell On

I had the same problem trying to get the emulator to work. The solution for me was to set up the player settings to android and click the VR supported tab with the daydream SDK selected in the VR SDKs dropdown BEFORE importing any daydream/google VR packages.

Took a lot of trial and error for me to figure that out. Hope that helps.

0
MJZ On

In addition to diesersamat's answer, I would like to add two things:

  • You could run the controller emulator via USB by choosing "USB" from the Emulator Connection property of the GvrController script that is attached to the GvrControllerMain component. For the USB connection to be made, you have to make sure that %AndroidSDKHome%/platform-tools is added to your PATH variable.
  • You could use the real controller via Emulator: Open the Controller Emulator app --> open the Emulator's overflow menu --> select Switch to Real Controller. For this to work, the phone that runs the emulator has to be Daydream ready. I usually use the same phone that I use for Daydream VR as a controller emulator.