[engine] 修复 v1.2.0 版本合并代码引入 spine cache 模式下的错误(#8)

This commit is contained in:
SmallMain
2024-09-04 17:11:00 +08:00
parent 2a97bc3a57
commit 7f956acda7
2 changed files with 3 additions and 3 deletions

View File

@@ -480,7 +480,7 @@ sp.Skeleton = cc.Class({
// override base class _updateMaterial to set define value and clear material cache
_updateMaterial () {
let useTint = this.useTint || (this.isAnimationCached() && !CC_NATIVERENDERER);
let useTint = this.useTint;
let baseMaterial = this.getMaterial(0);
if (baseMaterial) {
const isMultiSupport = baseMaterial.material.isMultiSupport();
@@ -535,7 +535,7 @@ sp.Skeleton = cc.Class({
_updateUseTint () {
let baseMaterial = this.getMaterial(0);
if (baseMaterial) {
let useTint = this.useTint || (this.isAnimationCached() && !CC_NATIVERENDERER);
let useTint = this.useTint;
if (baseMaterial.material.isMultiSupport()) {
this._defineMaterialTint(baseMaterial, useTint);
} else {