在Unity 2018打开旧版本Unity项目,报了下面的两个错误:
Cannot access protected member `UnityEngine.Texture.Texture()’ via a qualifier of type `UnityEngine.Texture’.
`UnityEngine.Texture.Texture()’ is inaccessible due to its protection level
解决方法:
new Texture()改为new Texture2D(),由于Texture2D()需要两个返回值,所以你要输入两个任意值。
- 本文固定链接: http://jingyan.idoubi.net/1189.html
- 转载请注明: 游戏创作者大陆 于 逗分享开发经验 发表