diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 8d8f0ec05ae..6821f129b73 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -897,6 +897,7 @@ export class Skeleton extends UIRenderer { let cache = this._skeletonCache.getAnimationCache(this._skeletonData!.uuid, name); if (!cache) { cache = this._skeletonCache.initAnimationCache(this.skeletonData!.uuid, this._skeletonData!, name); + cache?.setSkin(this._skinName); } if (cache) { this._animationName = name; @@ -996,6 +997,7 @@ export class Skeleton extends UIRenderer { this._animCache.setSkin(name); } } + this._skinName = name; this.invalidAnimationCache(); }