Adding PakFile support to a game

I am developing a game in Unreal Engine, and want to distribute the game assets as PakFiles, that I can load at runtime using c++ code via FCoreDelegates::OnMountPak.

However OnMountPak.IsBound() returns false, and the Pak related files are not being built as part of the project - even though they are ostensiably part of the Runtime module.

I think I need to add “PakFile” as a dependency to one of the Build.cs or Target.cs files but I don’t know which one, or, if in fact, this is the correct way to add support. Not even sure if I would need to add this to my game files - or to rebuild the engine from source.

Any help on adding PakFile support?

So, adding “PakFile” to my “Plugin.Build.cs” PrivateDependencyModuleNames has added the PakFile API things to the project: FPakPlatformFile can now be used. FCoreDelegates::OnMountPak is still not mounted however.