3.x对应2.x用tween改透明度怎么做啊,我拿2.x改了,tween没生效

var t1= tween(effectNode.getComponent(UIOpacity))

            t1.to(this.shadowTime, { opacity: 0 }, { easing: 'cubicIn' }).start();

            var t2= tween(effectNode.getComponent(UITransform))

            t2.to(this.shadowTime, { width: 0 }).start();

你节点上添加UIOpacity组件没

加了的,2.x拿过来用不加组件全是报错

那我就不太清楚了,我写的挺正常的
tween(lb.getComponent(UIOpacity))
.set({ opacity: 0 })
.to(0.2, { opacity: 255 })
.delay(2.5)
.to(0.2, { opacity: 0 })
.start()

感谢,我再看看,可能是其他地方问题