本文用Unity的Daydream Preview GVR13版本开发同时兼容Daydream和Cardboard的Android应用,Android Studio版本为2.2.3。
This Cardboard application is not compatible with Daydream headsets."的错误。Minimum API Level选API level 19(Cardboard最低支持API level 19,Daydream最低支持API level 24)。
VRModeEnabled Determine whether the scene renders in stereo or mono. Supported only for versions of Unity without the GVR integration. VRModeEnabled will be a no-op for versions of Unity with the GVR integration. True means to render in stereo, and false means to render in mono.
1 void LateUpdate() { 2 GvrViewer.Instance.UpdateState(); 3 if (GvrViewer.Instance.BackButtonPressed) { 4 // TODO do what you wanna do here 5 } 6 }
写一个脚本,挂在场景里的某个GameObject上,并在LateUpdate()里面做逻辑处理。
本文为原创,如果转载请注明出处
基于Daydream technical preview GVR13开发Daydream,Cardboard的Android应用
原文:http://www.cnblogs.com/elfnaga/p/6294779.html