diff --git a/engine/cocos2d/core/components/CCLabel.js b/engine/cocos2d/core/components/CCLabel.js index b3e5402d..1630a4b3 100644 --- a/engine/cocos2d/core/components/CCLabel.js +++ b/engine/cocos2d/core/components/CCLabel.js @@ -819,8 +819,10 @@ let Label = cc.Class({ // 根据材质更新 uniform const isMultiMaterial = material.material.isMultiSupport(); if (isMultiMaterial) { - // 贴图在 updateRenderData 才确定下来 - // if (texture) this._updateMultiTexId(material, texture); + const texture = this._frame._texture; + if (texture instanceof cc.Texture2D && !texture.loaded) { + cc.assetManager.postLoadNative(texture); + } this._texIdDirty = true; } else { material.setProperty('texture', this._frame._texture); diff --git a/engine/cocos2d/core/components/CCMotionStreak.js b/engine/cocos2d/core/components/CCMotionStreak.js index e7fcfb7a..a2fb140a 100644 --- a/engine/cocos2d/core/components/CCMotionStreak.js +++ b/engine/cocos2d/core/components/CCMotionStreak.js @@ -261,6 +261,10 @@ var MotionStreak = cc.Class({ const isMultiMaterial = material.material.isMultiSupport(); if (isMultiMaterial) { if (!this._texture) return; + const texture = this._texture; + if (texture instanceof cc.Texture2D && !texture.loaded) { + cc.assetManager.postLoadNative(texture); + } this._updateMultiTexId(material, this._texture); } else { const textureImpl = this._texture && this._texture.getImpl(); diff --git a/engine/cocos2d/core/components/CCSprite.js b/engine/cocos2d/core/components/CCSprite.js index 869048ef..a36541a2 100644 --- a/engine/cocos2d/core/components/CCSprite.js +++ b/engine/cocos2d/core/components/CCSprite.js @@ -486,8 +486,9 @@ var Sprite = cc.Class({ // 根据材质更新 uniform const isMultiMaterial = material.material.isMultiSupport(); if (isMultiMaterial) { - // 在 assembler 中进行更新性能会更好,不需要每次 setSpriteFrame 都更新,并且动态图集会导致两次触发 - // if (texture) this._updateMultiTexId(material, texture); + if (texture instanceof cc.Texture2D && !texture.loaded) { + cc.assetManager.postLoadNative(texture); + } this._texIdDirty = true; } else { const textureImpl = texture && texture.getImpl();