Running google-vr unity daydream app on google pixel

本小妞迷上赌 提交于 2019-12-12 04:45:41

问题


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.


回答1:


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




回答2:


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:

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:

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



来源:https://stackoverflow.com/questions/44509873/running-google-vr-unity-daydream-app-on-google-pixel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!