我刚刚统一下载了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/