unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决

开发案例参考 07-游乐设备选择场景搭建_哔哩哔哩_bilibili

导入之后代码报错Assets/SteamVR/Editor/SteamVR_Settings.cs(135,49): error CS0117: `UnityEditorInternal.VR.VREditor' does not contain a definition for `GetVREnabledDevices'

unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决_第1张图片

解决方法 打开SteamVR_Settings

脚本,修改代码135行

```

//var devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevices(BuildTargetGroup.Standalone);
var devices = UnityEditorInternal.VR.VREditor.GetVREnabledDevicesOnTargetGroup(BuildTargetGroup.Standalone);

```

代码157行

```

//UnityEditorInternal.VR.VREditor.SetVREnabledDevices(BuildTargetGroup.Standalone, newDevices);
UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(BuildTargetGroup.Standalone, newDevices);

```

Texture()爆红

新版本已经不支持Texture()方法了,直接注释掉。不影响使用

代码中提示缺少.Net4.7.1

unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决_第2张图片

下载 .NET Framework 4.7.1 Developer Pack Offline Installer

 安装一下

DllNotFoundException: openvr_api

unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决_第3张图片

 

unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决_第4张图片

unity 2018.4.0+SteamVR1.2.2+VRTK3.2.1报错解决_第5张图片

 

 开发测试需要

 VR头显、手柄、定位器(HTC)

下载Steam,并安装好SteamVR,配置游玩模式(站立/房间)

>摘要:参考B站老师的课程

07-游乐设备选择场景搭建_哔哩哔哩_bilibili

课程使用HTC Vive设备开发,使用SteamVR1.2.2和VRTK3.2.1版本开发。 将游乐项目在VR里体验,使用新版VRTK实现了射线与UI的交互、新版VRTK的使用。 课程资料 链接:https://pan.baidu.com/s/1q228vm2oc65fPOTO5xncTg 提取码:igfl

好好学习吧!~~

你可能感兴趣的:(unity,游戏引擎,SteamVR1.2.2,VRTK3.2.1,HTC)