您的位置:首页 > 其它

遇到无定义错误解决方案

2017-04-10 12:00 134 查看
error CS1061: Type `UnityEngine.Component' does not contain a definition for `material' and no extension method `material' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?

这种无定义的问题,修改的时候只需要用GetComponenet<>(),就可以。

例如下面所示:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: