Might not help you but here’s the code I’ve got to mount pak files (not tested umaps yet). The first few lines are setting the mount point to the pak file location so files can be pathed relative to that - MakeStandardFilename is very important in the approach I take - the internal pak file directory structure is quite sensitive to paths.
RegisterMountPoint makes my files accessible using the short file names. In this case a filename of a/b/c.uasset within the pak would become /dlc/a/b/c
The output after has proven useful while working through my own pak file woes, so I’ve included it here.
FString StandardFilename(rPakFileName);
FPaths::MakeStandardFilename(StandardFilename);
StandardFilename = FPaths::GetPath(StandardFilename);
if (!mp_DLCPakFiles->Mount(*rPakFileName, 0, *StandardFilename))//DLCPakMountPoint))
{
Errorf(_T("DLC - Unable to mount pak file '%s' to '%s'"), *rPakFileName, *StandardFilename);
return false;
}
FPackageName::RegisterMountPoint("/DLC/", StandardFilename);
//TODO UnRegisterMountPoint
#if MM_DEBUGrPakFileName
struct Dump : public IPlatformFile::FDirectoryVisitor
{
virtual bool Visit(const TCHAR* FilenameOrDirectory, bool bIsDirectory)
{
if (bIsDirectory)
{
Outputf(_T("Directory: %s"), FilenameOrDirectory);
}
else
{
Outputf(_T("File: %s"), FilenameOrDirectory);
}
return true;
}
};
Dump visitor;
mp_DLCPakFiles->IterateDirectoryRecursively(*StandardFilename, visitor);
#endif