diff --git a/spine-ts/spine-pixi-v7/src/Spine.ts b/spine-ts/spine-pixi-v7/src/Spine.ts index d69e7f501..6e898e352 100644 --- a/spine-ts/spine-pixi-v7/src/Spine.ts +++ b/spine-ts/spine-pixi-v7/src/Spine.ts @@ -296,15 +296,15 @@ export class Spine extends Container { beforeUpdateWorldTransforms: (object: Spine) => void = () => { }; afterUpdateWorldTransforms: (object: Spine) => void = () => { }; - private _autoUpdate: boolean = true; + private _autoUpdate: boolean = false; public get autoUpdate (): boolean { return this._autoUpdate; } /** When `true`, the Spine AnimationState and the Skeleton will be automatically updated using the {@link Ticker.shared} instance. */ public set autoUpdate (value: boolean) { - if (value) { + if (value && !this._autoUpdate) { Ticker.shared.add(this.internalUpdate, this); - } else { + } else if (!value && this._autoUpdate) { Ticker.shared.remove(this.internalUpdate, this); } this._autoUpdate = value; diff --git a/spine-ts/spine-pixi-v8/src/Spine.ts b/spine-ts/spine-pixi-v8/src/Spine.ts index ab40198aa..0b1b8a3d3 100644 --- a/spine-ts/spine-pixi-v8/src/Spine.ts +++ b/spine-ts/spine-pixi-v8/src/Spine.ts @@ -351,16 +351,16 @@ export class Spine extends ViewContainer { this._debug = value; } - private _autoUpdate = true; + private _autoUpdate = false; public get autoUpdate (): boolean { return this._autoUpdate; } /** When `true`, the Spine AnimationState and the Skeleton will be automatically updated using the {@link Ticker.shared} instance. */ public set autoUpdate (value: boolean) { - if (value) { + if (value && !this._autoUpdate) { Ticker.shared.add(this.internalUpdate, this); - } else { + } else if (!value && this._autoUpdate) { Ticker.shared.remove(this.internalUpdate, this); }