unity3d - Unity VRTK Assets 错误

标签 unity3d error-handling textures vrtk

我刚刚统一下载了VRTK v3.20 Assets ,但是在导入后我开始出现一些错误。我似乎无法在线找到解决方案。
Unity版本:2018.1.6f1个人64位。
错误:

1.VRTK/Scripts/Interactions/Highlighters/VRTK_MaterialColorSwapHighlighte.cs(146,66): error CS1540: Cannot access protected member UnityEngine.Texture.Texture()' via a qualifier of typeUnityEngine.Texture'. The qualifier must be of type `VRTK.Highlighters.VRTK_MaterialColorSwapHighlighter' or derived from it

2.VRTK/Scripts/Interactions/Highlighters/VRTK_MaterialColorSwapHighlighte.cs(146,66): error CS0122: `UnityEngine.Texture.Texture()' is inaccessible due to its protection level


这是有错误的行:
renderer.material.SetTexture("_MainTex", new Texture());

最佳答案

Assets 商店中的VRTK 3.2.0不支持Unity 2018.1。您需要从Github页面获取VRTK 3.3.0,使用master分支:

https://github.com/thestonefox/VRTK

关于unity3d - Unity VRTK Assets 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51167676/

相关文章:

c# - 线程结束时在主线程上回调

c# - 播放器与具有特定标签的对象碰撞时的 Unity3D 播放声音

ruby-on-rails - 错误: Wasabi::Resolver::HTTPError in HomeController#index for MindBody API SOAP RoR

php - 意外的语法错误

c++ - 简单的附加代码,带有严重的错误处理

ios - 如何从 .pvr.ccz 文件中恢复 PNG 图像?

javascript - 在 WebGL 中绘制金字塔纹理

c# - 如果用户有互联网连接则显示按钮

android - Unity 2020 无法将 android APK 更新到 API 级别 29

android - 有没有办法在 Android 上使用 OpenGL 在两个上下文/线程之间共享纹理?