This commit is contained in:
Leslie Leigh
2018-12-07 16:59:51 +08:00
committed by pandamicro
parent 578e811a82
commit 5df8df4342
+8 -1
View File
@@ -275,6 +275,13 @@ export default class ModelComponent extends RenderableComponent {
_getBuiltinMaterial() {
// classic ugly pink indicating missing material
return cc.BuiltinResMgr['default-material'];
//return cc.BuiltinResMgr['default-material'];
if (ModelComponent._m === null) {
ModelComponent._m = new cc.Material();
ModelComponent._m.effectName = 'builtin-effect-phong';
}
return ModelComponent._m;
}
static _m = null;
}