-
Creator 版本: 3.4.0
-
目标平台: Edge
-
重现方式:
方式1:
tween(this.sprite.color)
.to(1, {a: 0})
.start()
结果:对a属性缓动无效,无反应,无报错
方式2:
tween(this.sprite)
.to(1, {color: color(255, 255, 255, 0)})
.start()
结果:有问题,在变化过程中会出现五彩斑斓的颜色
方式3:在sprite所在节点添加UIOpacity组件
tween(this.sprite.getComponent(UIOpacity))
.to(1, { opacity: 0 })
.start()
结果:效果正常,但官方不推荐。参考链接: UIOpacity 组件参考 · GitBook (cocos.com)
不知道该咋办了


我也是用了第三种方法,现在才知道是不推荐的