Gear VR在Unity下的开发与调试

2017-07-05  本文已影响0人  GreatSun

环境配置

g:
cd G:\HTC VIVE DEVEP\training\android-sdk-windows\platform-tools
adb devices

即可获取设备的ID,如图(1)所示。
下载Oculus签名文件:
(a)进入https://developer.oculus.com/osig/ 页面,登录Oculus账户。如果没有账号,需要注册一个。

图(1)

(b)账号登陆后,将设备ID粘贴到表格输入框中,并点击DOWNLOADFILE按钮。下载你的签名文件。

DEMO展示

Debug

由于Gear VR不能直接连接电脑测试,所以如何进行debug是一个很重要的问题,这里,我们使用wifi连接进行debug内容的输出。
(a) 手机和电脑需要连接同一个无线网。
(b) 用USB先把手机连接到电脑。
(c) 使用cmd切换到AndroidSDK所在的目录。设置目标设备监听TCP/IP连接,使用端口5555.

g:
cd G:\HTC VIVE DEVEP\training\android-sdk-windows\platform-tools
adb tcpip 5555

(d) 手机与电脑断开连接。
(e) 找到手机的IP地址,可以在查看WiFi连接的地方找到。
(f) 通过IP地址连接手机。

adb connect <device-ip-address>

(g) 在电脑上确认手机已连接。

adb devices
List of devices attached
<device-ip-address>:5555 device

(h) 监听程序的输出

adb logcat -s <tag>

将<tag>设为Unity就可以抓取Unity的debug信息。

上一篇 下一篇

猜你喜欢

热点阅读