mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Fix AssetLibrary cache issue and uuid loader this issue
This commit is contained in:
@@ -94,7 +94,7 @@ function loadUuid (item, callback) {
|
||||
}
|
||||
var pipeline = this.pipeline;
|
||||
if (depends.length > 0) {
|
||||
this.pipeline.flowInDeps(depends, function (items) {
|
||||
pipeline.flowInDeps(depends, function (items) {
|
||||
var item;
|
||||
for (var src in items) {
|
||||
item = items[src];
|
||||
@@ -113,7 +113,7 @@ function loadUuid (item, callback) {
|
||||
obj[dependProp] = value;
|
||||
}
|
||||
else {
|
||||
this.getItems().add(dependSrc, function (item) {
|
||||
pipeline.getItems().add(dependSrc, function (item) {
|
||||
var value = item.isRawAsset ? (item.url || item.src) : item.content;
|
||||
this.obj[this.prop] = value;
|
||||
}, {
|
||||
|
||||
@@ -170,14 +170,14 @@ var AssetLibrary = {
|
||||
}
|
||||
if (thisTick) {
|
||||
callInNextTick(function () {
|
||||
if (isScene(asset)) {
|
||||
if (isScene(asset) || CC_EDITOR) {
|
||||
Loader.removeItem(uuid);
|
||||
}
|
||||
callback(error, asset);
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isScene(asset)) {
|
||||
if (isScene(asset) || CC_EDITOR) {
|
||||
Loader.removeItem(uuid);
|
||||
}
|
||||
callback(error, asset);
|
||||
@@ -208,7 +208,7 @@ var AssetLibrary = {
|
||||
}
|
||||
if (thisTick) {
|
||||
callInNextTick(function () {
|
||||
if (isScene(asset)) {
|
||||
if (isScene(asset) || CC_EDITOR) {
|
||||
Loader.removeItem(randomUuid);
|
||||
}
|
||||
asset._uuid = '';
|
||||
@@ -216,7 +216,7 @@ var AssetLibrary = {
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isScene(asset)) {
|
||||
if (isScene(asset) || CC_EDITOR) {
|
||||
Loader.removeItem(randomUuid);
|
||||
}
|
||||
asset._uuid = '';
|
||||
|
||||
Reference in New Issue
Block a user