From ea90fb1da9291424928855491561ba4fee58845c Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Wed, 19 Oct 2016 16:49:13 +0800 Subject: [PATCH] remove loadingItem.deserializeInfo --- cocos2d/core/load-pipeline/uuid-loader.js | 3 ++- cocos2d/core/platform/CCAssetLibrary.js | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cocos2d/core/load-pipeline/uuid-loader.js b/cocos2d/core/load-pipeline/uuid-loader.js index 77604f6f6d..d27d399b4c 100644 --- a/cocos2d/core/load-pipeline/uuid-loader.js +++ b/cocos2d/core/load-pipeline/uuid-loader.js @@ -210,7 +210,7 @@ function loadUuid (item, callback) { return Object; }; - var tdInfo = CC_JSB ? new cc.deserialize.Details() : (item.deserializeInfo || _tdInfo); + var tdInfo = CC_JSB ? new cc.deserialize.Details() : _tdInfo; var asset; try { @@ -221,6 +221,7 @@ function loadUuid (item, callback) { }); } catch (e) { + tdInfo.reset(); var err = CC_JSB ? (e + '\n' + e.stack) : e.stack; callback( new Error('Uuid Loader: Deserialize asset [' + item.id + '] failed : ' + err) ); return; diff --git a/cocos2d/core/platform/CCAssetLibrary.js b/cocos2d/core/platform/CCAssetLibrary.js index 4d06b9a20b..d62ab80a52 100644 --- a/cocos2d/core/platform/CCAssetLibrary.js +++ b/cocos2d/core/platform/CCAssetLibrary.js @@ -63,8 +63,6 @@ var AssetLibrary = { * @param {Boolean} options.readMainCache - Default is true. If false, the asset and all its depends assets will reload and create new instances from library. * @param {Boolean} options.writeMainCache - Default is true. If true, the result will cache to AssetLibrary, and MUST be unload by user manually. * @param {Asset} options.existingAsset - load to existing asset, this argument is only available in editor - * @param {deserialize.Details} options.deserializeInfo - specified a DeserializeInfo object if you want, - * this parameter is only available in editor. * @private */ loadAsset: function (uuid, callback, options) { @@ -77,9 +75,6 @@ var AssetLibrary = { id: uuid, type: 'uuid' }; - if (options && options.deserializeInfo) { - item.deserializeInfo = options.deserializeInfo; - } if (options && options.existingAsset) { item.existingAsset = options.existingAsset; }