Centralize AssetManifest base path logic (still need to improve this system)
This commit is contained in:
@@ -114,7 +114,9 @@ import sys.FileSystem;
|
||||
|
||||
if (bytes != null) {
|
||||
|
||||
__fromManifest (AssetManifest.fromBytes (bytes));
|
||||
var manifest = AssetManifest.fromBytes (bytes);
|
||||
manifest.basePath = rootPath;
|
||||
__fromManifest (manifest);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -124,6 +126,7 @@ import sys.FileSystem;
|
||||
|
||||
if (manifest != null) {
|
||||
|
||||
manifest.basePath = rootPath;
|
||||
__fromManifest (manifest);
|
||||
|
||||
} else {
|
||||
@@ -157,23 +160,6 @@ import sys.FileSystem;
|
||||
}
|
||||
|
||||
|
||||
private override function __fromManifest (manifest:AssetManifest):Void {
|
||||
|
||||
super.__fromManifest (manifest);
|
||||
|
||||
if (rootPath != "") {
|
||||
|
||||
for (asset in manifest.assets) {
|
||||
|
||||
paths.set (asset.id, rootPath + asset.path);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user