In my project I recieve some data from external files. In Windows project read files from application dir by default, but in macOS no and required absolute path. My question - how recieve current dir in macOS. I know about os.getenv(“HOME”) , but it return user home, but i need app dir. Thank you
Would return full path to the engine exectuable I think.
You can also do it based on PID.
I don’t have a Mac handy at the moment to test.
Keep in mind it’s non-trivial to get access to the files Defold packs into the game’s resource files. If you add the files to the .app file it’s no problem.
It would probably be useful if someone made a “where am I” native extension for the various platforms.