mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 02:02:41 +08:00
optimize spine/dragonbones material update (#13416)
* optimize spine/dragonbones material update * add material assets depends for dragonbones
This commit is contained in:
@@ -558,6 +558,10 @@ void SkeletonCacheAnimation::setRenderEntity(cc::RenderEntity* entity) {
|
||||
|
||||
void SkeletonCacheAnimation::setMaterial(cc::Material *material) {
|
||||
_material = material;
|
||||
for (auto &item : _materialCaches) {
|
||||
CC_SAFE_DELETE(item.second);
|
||||
}
|
||||
_materialCaches.clear();
|
||||
}
|
||||
|
||||
cc::RenderDrawInfo* SkeletonCacheAnimation::requestDrawInfo(int idx) {
|
||||
|
||||
Reference in New Issue
Block a user