如何在Google Gvr中访问纸板触发器(在代码中)? 1.6版SDK [英] How to access the cardboard trigger on google Gvr( in code)? 1.6 version SDK

查看:100
本文介绍了如何在Google Gvr中访问纸板触发器(在代码中)? 1.6版SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆