Skip to content

Commit

Permalink
Fix the issue where the Spine skeleton is not reassigned due to node …
Browse files Browse the repository at this point in the history
…reuse.
  • Loading branch information
bofeng-song committed Oct 30, 2024
1 parent b12e51a commit a250e6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cocos/spine/skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,10 @@ export class Skeleton extends UIRenderer {
this._destroySkeletonInfo(this._skeletonCache);
this._skeletonInfo = this._skeletonCache!.createSkeletonInfo(this._skeletonData!);
this._skeleton = this._skeletonInfo.skeleton!;
} else {
if (!this._skeleton && this._skeletonInfo) {

Check failure on line 825 in cocos/spine/skeleton.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unexpected if as the only statement in an else block
this._skeleton = this._skeletonInfo.skeleton!;
}
}
} else {
this._skeleton = this._instance!.initSkeleton(skeletonData);
Expand Down

0 comments on commit a250e6b

Please sign in to comment.