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<>(),就可以。
例如下面所示: