mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Fix editor cannot open scene while inner asset missing (#2945)
* Fix editor cannot open scene while inner asset missing * Improve code
This commit is contained in:
@@ -170,10 +170,15 @@ function loadDepends (pipeline, item, asset, depends, callback) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Emit dependency errors in runtime, but not in editor,
|
||||
// because editor need to open the scene / prefab to let user fix missing asset issues
|
||||
if (CC_EDITOR && missingAssetReporter) {
|
||||
missingAssetReporter.reportByOwner();
|
||||
callback(null, asset);
|
||||
}
|
||||
else {
|
||||
callback(errors, asset);
|
||||
}
|
||||
callback(errors, asset);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user