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/";
|
rootPath = "assets/";
|
||||||
#elseif android
|
#elseif android
|
||||||
rootPath = "";
|
rootPath = "";
|
||||||
#elseif console
|
#elseif (console || sys)
|
||||||
rootPath = lime.system.System.applicationDirectory;
|
rootPath = lime.system.System.applicationDirectory;
|
||||||
#elseif sys
|
|
||||||
rootPath = Path.directory(Sys.programPath()) + "/";
|
|
||||||
#else
|
#else
|
||||||
rootPath = "./";
|
rootPath = "./";
|
||||||
#end
|
#end
|
||||||
|
|||||||
Reference in New Issue
Block a user