|
@@ -283,6 +283,11 @@ class World extends Object {
|
|
|
return null;
|
|
|
try {
|
|
|
return hxd.res.Loader.currentInstance.load(mat.specularTexture).toImage();
|
|
|
+ } catch( e : hxd.res.NotFound ) try {
|
|
|
+ var path = path.split("/");
|
|
|
+ path.pop();
|
|
|
+ path.push(mat.specularTexture.split("/").pop());
|
|
|
+ return hxd.res.Loader.currentInstance.load(path.join("/")).toImage();
|
|
|
} catch( e : hxd.res.NotFound ) {
|
|
|
return null;
|
|
|
}
|
|
@@ -293,6 +298,11 @@ class World extends Object {
|
|
|
return null;
|
|
|
try {
|
|
|
return hxd.res.Loader.currentInstance.load(mat.normalMap).toImage();
|
|
|
+ } catch( e : hxd.res.NotFound ) try {
|
|
|
+ var path = path.split("/");
|
|
|
+ path.pop();
|
|
|
+ path.push(mat.normalMap.split("/").pop());
|
|
|
+ return hxd.res.Loader.currentInstance.load(path.join("/")).toImage();
|
|
|
} catch( e : hxd.res.NotFound ) {
|
|
|
return null;
|
|
|
}
|