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


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.



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 :

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