reset bone.active after updateCache (#340)

* reset bone.active after updateCache

* upload version
This commit is contained in:
zxx43
2026-09-20 10:13:12 +08:00
committed by GitHub
parent 557b06f7e6
commit 0fd910220e
2 changed files with 13 additions and 1 deletions
@@ -751,7 +751,19 @@ void SpineSkeletonInstance::resizeSlotRegion(const spine::String &slotName, uint
releaseSlotCacheInfo(cacheInfo);
}
_slotTextureSet.put(slot, info);
auto &bones = _skeleton->getBones();
const size_t boneCount = bones.size();
std::vector<bool> activeBackup(boneCount);
for (size_t i = 0; i < boneCount; ++i) {
activeBackup[i] = bones[i]->isActive();
}
_skeleton->updateCache();
for (size_t i = 0; i < boneCount; ++i) {
bones[i]->setActive(activeBackup[i]);
}
}
void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureUuid) {
+1 -1
View File
@@ -3,6 +3,6 @@
"type": "github",
"owner": "cocos",
"name": "cocos-engine-external",
"checkout": "v4.0.0-9"
"checkout": "v4.0.0-10"
}
}