CocosCreator 使用引擎自带材质

//-- 使用引擎自带材质
let mm = cc.Material.getBuiltinMaterial("2d-gray-sprite")     
node.getComponent(cc.Sprite).setMaterial(0, mm)

猜你喜欢

转载自blog.csdn.net/qq_38318701/article/details/131224617