Use applicationDirectory to locate assets.
`programPath()` returns the directory of the executable, but that isn't always the asset root. (Notably, in the case of Mac apps.)
This commit is contained in:
@@ -59,10 +59,8 @@ import sys.FileSystem;
|
||||
rootPath = "assets/";
|
||||
#elseif android
|
||||
rootPath = "";
|
||||
#elseif console
|
||||
#elseif (console || sys)
|
||||
rootPath = lime.system.System.applicationDirectory;
|
||||
#elseif sys
|
||||
rootPath = Path.directory(Sys.programPath()) + "/";
|
||||
#else
|
||||
rootPath = "./";
|
||||
#end
|
||||
|
||||
Reference in New Issue
Block a user