Hi all,
I’ve read up on system.pathForFile on Android devices, but still have a question.
I’m storing a .RAD file (Radiance Particle Engine) in {root}/custom/particles folder. Everything works fine in Simulator but system.pathForFile is returning nil on Android.
The code defining path is simple enough (dir = relative path, fx = filename):
function create(fx,dir) if dir==nil then path=system.pathForFile(fx) else path=system.pathForFile(dir.."\\"..fx) end .....
However, on Android device this will only work if I do NOT specify “dir” and store the .RAD files in the root of the project, which I really do not want to do.
I understand that the system.ResourcesDirectory constant is the default in system.pathForFile , which according to Documentation will return nil. But as I said, if I don’t specify “dir”, this all works on my Android device!
My call to the method defining the path is like this:
create("file.rad", "custom/particles")
Any help would be appreciated.
Cheers.