diff --git a/cocos/components/animation-component.ts b/cocos/components/animation-component.ts index 97e18d0d39..43a9fa8aaa 100644 --- a/cocos/components/animation-component.ts +++ b/cocos/components/animation-component.ts @@ -193,6 +193,11 @@ export class AnimationComponent extends Component implements IEventTarget { cc.director.getAnimationManager().removeCrossFade(this._crossFade); this._crossFade.stop(); } + for (const name of Object.keys(this._nameToState)) { + const state = this._nameToState[name]; + state.stop(); + } + this._nameToState = null as any; } /**