0
votes

Im trying to run the sample app provided in the daydream page on the google pixel phone.

1) I chnaged the build settings to android. 2) Went to player settings enabled Virtual reality support and selected google daydream as the platform. 3) I changed the Minumum API to API level 24. 4) I added the folder containing my adb to the path variable in windows. 5) I also set the path of the android SDk. 6) I enabled USB debuggin on Pixel

However when I run my app , I get the following errors:

Device daydream not supported in Editor Mode. Please run on target device. And.. Failed to read from controller emulator app event socket. Verify that the controller emulator app is running.

2
"Device daydream not supported in Editor Mode. Please run on target device." cant be more obvious ;)Lestat
How do I switch from editor mode and run it on the target device? On the daydream site it asks us to connect the phone with a USB and press play and that's not workingNikhil Cherukuri
you need to "build and play" if Im not mistakenLestat
@NikhilCherukuri is asking about instant preview for daydream and it's not that obvious as the mentioned sentence is a warning yet the daydream controller can be simulated within editor if that's what you want but if you want to run on phone you'll have to build it.Ashish

2 Answers

0
votes

build the apk and start it on your device. build and play requires adb.

0
votes

As I suppouse, you want to DEBUG your Daydream app on your Programming Environment (Unity in this case).

Note:This solution allows you to debug on your PC but you'll need one Pixel Phone connected to your PC, and one Daydream Controller.

First of all I recommend you to download the samples provided by Google on Github if you have not done it yet: https://github.com/googlevr/gvr-unity-sdk/releases

When you load any scene you'll see that the Daydream basic set is composed for a hierarchy like:

Daydream basic components grouped inside an empty object called DaydreamSet

The two selected components are key for your porpouse cause if you want to debug Daydream from your PC you'll need to "link" your daydream controller with InstantPreview App. Instant preview will downloaded instantly on your phone if you got in your scene the "GvrInstantPreviewMain".

InstanPreview Google Info: https://developers.google.com/vr/develop/unity/instant-preview

When the app has been opened, can happen 3 things on your pixel phone:

  1. Everything works as it should.
  2. Daydream Instant Preview infom to correct the device by USB.
  3. Kind of Grey screen with some text.

If you're on 2.

This seems to happen when your Unity Project is desynchronized from your phone and you'll see something like:

enter image description here

Close InstantPreviewApplication on your phone, close your unity project (remember to save your progress), and open again your unity project. That has almost always solved me.

If you're on 3.

This seems to happens when instan preview is waiting for Unity Play Mode. You only need to press Play on you Unity Poject.

Remember to press (and mantain) synchronize button on your Daydream controller if you can move the headset camera but can't find your controller reticle.

This works for me.

I also append my own Unity project with this scheme that works bought for Daydream and GearVR in case helps someone else to test my solution: https://github.com/ls29322/VR_GalleryApp