Function to get path to the game's directory (Issue-3520)(SOLVED)

There is currently no way to get the path to the resources you bundled using bundled_resources without using native code (see DefOS’s defos.get_bundle_root()). Sometimes this is the same as the current working directory (Linux and Windows if you double-click the executable), but it’s not always true (if the game is started from the terminal, or in case of macOS and iOS, apps start with their cwd set to / by default).

I think this should part of the engine because without it, another engine feature (bundled_resources) is really hard to use.

2 Likes

In the meanwhile, I added fmod.get_bundle_root() to the FMOD extension, since loading banks from bundled_resources is a very common use case.

1 Like

Thanks. This is tracked as Issue-3520 and also discussed here with @selimanac : https://github.com/defold/editor2-issues/issues/2606

I’ve added it to our sprint planning on Monday.

2 Likes

Solved Defold 1.2.160 has been released

3 Likes