Allow non-embedded library JSON
This commit is contained in:
@@ -481,9 +481,7 @@ class Assets {
|
|||||||
|
|
||||||
#if (tools && !display && !macro)
|
#if (tools && !display && !macro)
|
||||||
|
|
||||||
var data = getText ("libraries/" + name + ".json");
|
loadText ("libraries/" + name + ".json").onComplete (function (data) {
|
||||||
|
|
||||||
if (data != null && data != "") {
|
|
||||||
|
|
||||||
var library = AssetLibrary.fromManifest (AssetManifest.parse (data));
|
var library = AssetLibrary.fromManifest (AssetManifest.parse (data));
|
||||||
|
|
||||||
@@ -499,11 +497,11 @@ class Assets {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
}).onError (function (_) {
|
||||||
|
|
||||||
promise.error ("[Assets] There is no asset library named \"" + name + "\"");
|
promise.error ("[Assets] There is no asset library named \"" + name + "\"");
|
||||||
|
|
||||||
}
|
});
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user