mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
reuse loaded asset in editor, avoid loading again (#4088)
This commit is contained in:
committed by
Weiliang Wang
parent
324cd3f106
commit
55329652da
@@ -120,7 +120,7 @@ let AssetLibrary = {
|
||||
asset.scene.dependAssets = getDependsRecursively(key);
|
||||
}
|
||||
}
|
||||
if (CC_EDITOR || isScene(asset)) {
|
||||
if (isScene(asset)) {
|
||||
var id = cc.loader._getReferenceKey(uuid);
|
||||
cc.loader.removeItem(id);
|
||||
}
|
||||
|
||||
@@ -270,13 +270,6 @@ class CCLoader extends Pipeline {
|
||||
completeCallback = null;
|
||||
}
|
||||
|
||||
if (CC_EDITOR) {
|
||||
for (let id in self._cache) {
|
||||
if (self._cache[id].complete) {
|
||||
self.removeItem(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
items.destroy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user