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:
pandamicro
2018-07-05 14:48:48 +08:00
committed by GitHub
parent 5e643f0a3a
commit 077dbfd1ad
+6 -1
View File
@@ -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);
});
}