问题描述
如何在Google Gvr(使用代码)中访问纸板触发器?在早期版本中,它是GvrViewer.Instance.Triggered
How to access the cardboard trigger on google Gvr( in code) ? In the earlier version it was GvrViewer.Instance.Triggered
推荐答案
我使用Input.GetButtonDown("Fire 1")
,它适用于最新的SDK版本(1.6)和最新的Unity版本(5.6)
I use Input.GetButtonDown("Fire 1")
and it works for me on the latest SDK version (1.6) and latest Unity version (5.6)
如果对unity支持的输入事件遵循默认的命名约定,请使用Input.GetButtonDown("Fire1")
.请注意,火"和"1"之间没有空格字符.
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".
否则,您可能会出现错误-"ArgumentException:未设置Input Button Fire 1."
Otherwise, you might the error - "ArgumentException: Input Button Fire 1 is not setup."
这篇关于如何在Google Gvr中访问纸板触发器(在代码中)? 1.6版SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!