找回密码
 立即注册
查看: 614|回复: 0

[简易教程] `UnityEngine.Texture.Texture()’ is inaccessible due to its protection level

[复制链接]
发表于 2019-10-17 10:54 | 显示全部楼层 |阅读模式
在Unity2018中导入一个老项目,报错:error CS0122: `UnityEngine.Texture.Texture()’ is inaccessible due to its protection level
解决办法:new Texture()改为new Texture2D(),由于Texture2D()需要两个返回值,所以你要输入两个任意值。new Texture2D(0,0)

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-4-27 11:47 , Processed in 0.090209 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表