cocos creator 遮罩不生效

我用代码生成遮罩不生效,为什么?
var color: cc.Color = new cc.Color().fromHEX('#000000');
this._mask.clearGraphics();
this._mask.setSize(maxWidth, maxHeight);
this._mask.drawRect(0, color, color);
this._iconContainer.mask = this._mask;
已邀请:

谷主

赞同来自:

不清楚_iconContainer是什么,如果你说的是GComponent,只只接受GImage和GGraph作为mask类型。

要回复问题请先登录注册