Compile fix

This commit is contained in:
Joshua Granick
2017-06-22 16:33:01 -07:00
parent e2aa060b55
commit 971b3c09d6

View File

@@ -11,6 +11,7 @@ import haxe.macro.Type;
#if (macro && !display)
import sys.io.File;
import sys.FileSystem;
#end
@@ -162,12 +163,18 @@ class AssetsMacro {
var path = filePath;
if (!sys.FileSystem.exists(filePath)) {
if (!FileSystem.exists (filePath)) {
path = Context.resolvePath (filePath);
}
if (path == null || path == null || !FileSystem.exists (path) || FileSystem.isDirectory (path)) {
return null;
}
var bytes = File.getBytes (path);
var resourceName = "__ASSET__" + metaName + "_" + (classType.pack.length > 0 ? classType.pack.join ("_") + "_" : "") + classType.name;