How to access the cardboard trigger on google Gvr( in code)? 1.6 version SDK

旧城冷巷雨未停 提交于 2019-12-12 04:14:29

问题


How to access the cardboard trigger on google Gvr( in code) ? In the earlier version it was GvrViewer.Instance.Triggered


回答1:


I use Input.GetButtonDown("Fire 1") and it works for me on the latest SDK version (1.6) and latest Unity version (5.6)

EDIT: Use Input.GetButtonDown("Fire1") if you follow the default naming conventions for input events supported by unity. Please note that there is no space character between "Fire" and "1".

Otherwise, you might the error - "ArgumentException: Input Button Fire 1 is not setup."




回答2:


You can use GvrPointerInputModule.Pointer.TriggerDown



来源:https://stackoverflow.com/questions/44920645/how-to-access-the-cardboard-trigger-on-google-gvr-in-code-1-6-version-sdk

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