mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
fix scene reloading
This commit is contained in:
@@ -96,13 +96,16 @@ module.exports = {
|
||||
|
||||
var unpacker = globalUnpackers[packUuid];
|
||||
if (unpacker) {
|
||||
var json = unpacker.retrieve(uuid);
|
||||
if (json) {
|
||||
callback(null, json);
|
||||
}
|
||||
else {
|
||||
error(callback, uuid, packUuid);
|
||||
}
|
||||
// ensure async
|
||||
setTimeout(function () {
|
||||
var json = unpacker.retrieve(uuid);
|
||||
if (json) {
|
||||
callback(null, json);
|
||||
}
|
||||
else {
|
||||
error(callback, uuid, packUuid);
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
else {
|
||||
this._loadNewPack(uuid, packUuid, callback);
|
||||
|
||||
Reference in New Issue
Block a user