北京小鸟看看科技有限公司
第 1 页 共 86 页
P
P
i
i
c
c
o
o
V
V
R
R
A
A
n
n
d
d
r
r
o
o
i
i
d
d
S
S
D
D
K
K
_
_
U
U
n
n
i
i
t
t
y
y
开
开
发
发
说
说
明
明
文
文
档
档
版本:v_2.3.0
北京小鸟看看科技有限公司
北京小鸟看看科技有限公司
第 2 页 共 86 页
目录
1 引言 ................................................................................................................................................ 6
1.1 编写目的 ....................................................................................................................... 6
1.2 背景 ............................................................................................................................... 6
2 支持设备 ........................................................................................................................................ 6
2.1 虚拟现实头盔 ............................................................................................................... 6
3 开发环境配置 ............................................................................................................................... 7
3.1 Unity 兼容版本 ............................................................................................................ 7
3.2 Android 手机调试 ...................................................................................................... 9
4 SDK 包组成 ................................................................................................................................. 10
4.1 PicoVR Android SDK 目录结构 ........................................................................... 10
4.2 PicoVR Android SDK 功能说明 ........................................................................... 11
4.2.1 Pvr_UnitySDK................................................................................................... 11
4.2.2 Pvr_Audio3D .................................................................................................... 12
4.2.3 Pvr_Controller ................................................................................................. 12
4.2.4 Pvr_ExtraSensor .............................................................................................. 12
4.2.5 Pvr_Haptics ...................................................................................................... 13
4.2.6 Pvr_Payment .................................................................................................... 13
4.2.7 Pvr_UnitySDKLegacy ..................................................................................... 13
4.2.8 Pvr_VolumePowerBrightness ..................................................................... 13
4.2.9 Pvr_TouchPad .................................................................................................. 14
5 Pvr_UnitySDK 开发过程指导 ................................................................................................. 14
北京小鸟看看科技有限公司
第 3 页 共 86 页
5.1 Pvr_UnitySDK 开发指导 ......................................................................................... 14
5.1.1 创建工程 ............................................................................................................. 14
5.1.2 导入开发包 ......................................................................................................... 15
5.1.3 替换相机 ............................................................................................................. 17
5.1.4 设置场景 ............................................................................................................. 17
5.1.5 模拟运行 ............................................................................................................. 18
5.1.6 模拟操作 ............................................................................................................. 18
5.1.7 安卓平台应用程序发布 .................................................................................... 19
5.1.8 关于 AndroidManifest ................................................................................... 20
6 设备控制器操作 ......................................................................................................................... 21
6.1 Pico Controller 的使用 ........................................................................................... 21
6.2 PicoNeo 控制器的姿态追踪 ................................................................................... 24
6.3 Pico1 和 Pico1s 触控板操作设置 .......................................................................... 26
7 辅助调试工具 ............................................................................................................................. 29
7.1 FPS 使用 .................................................................................................................... 29
8 支付 SDK 开发说明(仅限 PicoNeo 平台使用) ............................................................... 30
8.1 SDK 包介绍 ................................................................................................................ 30
8.1.1 Pico Payment SDK 目录结构 ....................................................................... 30
8.1.2 Pico Payment SDK 组成 ................................................................................ 30
8.2 Pico Payment SDK 使用指导 ................................................................................ 32
8.2.1 使用 SDK 内置 Demo 了解功能 .................................................................... 32
8.2.2 关于 AndroidManifest ................................................................................... 32
北京小鸟看看科技有限公司
第 4 页 共 86 页
8.2.3 获取 AppKey、AppID 和 AppSecret 的方法............................................ 33
8.3 Pico Payment SDK 功能接口说明 ....................................................................... 36
8.3.1 登陆 ..................................................................................................................... 36
8.3.2 支付 ..................................................................................................................... 37
8.3.3 查询订单 ............................................................................................................. 41
8.3.4 获取用户信息 .................................................................................................... 43
8.4 开发者服务端交互 .................................................................................................... 45
8.4.1 通知参数 ............................................................................................................. 47
8.4.2 返回结果 ............................................................................................................. 49
8.4.3 签名校验 ............................................................................................................. 49
9 Pvr_UnitySDK 功能接口说明 ................................................................................................. 51
9.1 Pvr_UnitySDK 预置件及脚本功能说明 ................................................................ 51
9.1.1 Pvr_UnitySDKConfigProfile 脚本 .............................................................. 52
9.1.2 Pvr_UnitySDKFPSs 脚本 ................................................................................ 52
9.1.3 Pvr_UnitySDKSensor 脚本 ............................................................................ 52
9.1.4 Pvr_UnitySDKPluginEvent 脚本 .................................................................. 53
9.1.5 Pvr_UnitySDKSightInputModule 脚本 ..................................................... 53
9.1.6 Pvr_UnitySDKEye 脚本 .................................................................................. 53
9.1.7 Pvr_UnitySDKEyeManager 脚本 ................................................................ 54
9.1.8 Pvr_UnitySDKHeadTrack 脚本 .................................................................... 54
9.1.9 Pvr_UnitySDKPose 脚本 ................................................................................ 54
9.1.10 Pvr_UnitySDKManager 脚本 ....................................................................... 55
北京小鸟看看科技有限公司
第 5 页 共 86 页
9.2 Unity API 接口说明 ................................................................................................. 56
9.2.1 获取版本信息 .................................................................................................... 56
9.2.2 头部跟踪相关接口 ............................................................................................ 56
9.2.3 Pico Controller 相关接口 .............................................................................. 58
9.2.4 电量音量亮度服务相关接口 ........................................................................... 65
9.2.5 设置环绕立体声(仅限 PicoNeo 使用) .................................................... 71
9.2.6 播放音频相关接口 ............................................................................................ 72
9.2.7 获取头戴距离传感器状态接口 ....................................................................... 73
9.2.8 马达震动相关接口(仅限 PicoNeo 使用) ................................................ 74
9.2.9 获取设备类型信息 ............................................................................................ 76
10 FAQ ...................................................................................................................................... 77