mask类型选的是图片,选其他的没问题,求大佬解答
既然选其它的没有问题,那就不用图片了;看你这个效果,需要的是圆角矩形的,直接用 Graphics 组件画吧。
const graphics = this.maskNode.getComponent(Graphics);
// 设置圆角矩形参数
const width = 200;
const height = 100;
const radius = 20;
// 绘制圆角矩形
graphics.roundRect(
-width/2, -height/2,
width, height,
radius
);
graphics.fill();
感谢大佬解答


