mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
reset bone.active after updateCache (#340)
* reset bone.active after updateCache * upload version
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
"type": "github",
|
||||
"owner": "cocos",
|
||||
"name": "cocos-engine-external",
|
||||
"checkout": "v4.0.0-9"
|
||||
"checkout": "v4.0.0-10"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user