diff --git a/cocos/3d/ui/components/button-component.ts b/cocos/3d/ui/components/button-component.ts index 68938d1a0b..020a04cac2 100644 --- a/cocos/3d/ui/components/button-component.ts +++ b/cocos/3d/ui/components/button-component.ts @@ -121,7 +121,6 @@ enum State { @ccclass('cc.ButtonComponent') @executionOrder(110) @menu('UI/Button') -@executeInEditMode export class ButtonComponent extends Component { /** @@ -538,7 +537,7 @@ export class ButtonComponent extends Component { } if (this._transition === Transition.COLOR) { - Color.lerp(renderComp._color, this._fromColor, this._toColor, ratio); + Color.lerp(renderComp.color, this._fromColor, this._toColor, ratio); } else if (this.transition === Transition.SCALE) { target.getScale(this._targetScale); this._targetScale.x = lerp(this._fromScale.x, this._toScale.x, ratio);