From 255141f3a64deb3965200f20e91bbe2654371626 Mon Sep 17 00:00:00 2001 From: JoneLau <32630749+JoneLau@users.noreply.github.com> Date: Wed, 10 Jul 2019 16:56:53 +0800 Subject: [PATCH] cancel button executeineditor (#4854) --- cocos/3d/ui/components/button-component.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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);