FStreamableManager load asset from pak - paths?

Hello,
I’m trying to use FStreamableManager to load cooked assets from a downloaded pak file. So my questions are:

  1. What is the meaning of the MountPoint of the pak file? Do I need to set the mount point of the pak file? To what?
  2. What format should the FStringAssetReferences have that I pass to FStreamableManager:

Eg, assuming the pak file contains:

TestPak/Content/Foo.uasset

exactly what path should I be passing to FStreamableManger to load the Foo asset? Does this depend on the mount point? If so, how?

I guess I don’t need to mention that using the same path from the pak file doesn’t work.

What is the difference between “short form” paths and “long form” - exactly what is the syntax for paths in general?

Also what is the meaning of ‘package’ in this context (paths)?

PAK files are just virtual file system structures. When you mount a PAK file, the engine knows to search it’s directory structure when loading assets. UOnlineHotfixManager::HotfixPakFile() does this to patch in a new PAK file. Let’s assume the file was downloaded to c:\temp\NewContent.pak. To mount it, you’d do:

FCoreDelegates::OnMountPak.Execute(TEXT(“c:\temp\NewContent.pak”), 0, nullptr);

Then you can load the file as if it is in the content directory. You don’t need to use the FStreamableManager. That’s just a way to load assets off of disk in the background (Async Loading). You can load the object just using LoadObject() if you want a blocking load from disk. The streamable manager does not stream the file from some server out on the internet. It just background loads the file into memory from disk.

As for downloading the file from the net, I’d just use our http request/response system to pull data from your CDN for the given file.

hi after mounting pak file like that how can I access or load the assets. what is the path to that?
Is it FPaths::EngineContentDir() or FPaths::GameContentDir()?

Usually Game/AssetName.uasset

Hi, I tried to load the asset by Game/AssetName.uasset but it gives the error that it isn’t a valid unreal engine path

Sorry, that should be Game/PathToAsset/AssetName for an asset that lives in the game content directory. For a content plugin it should be PluginName/PathToAsset/AssetName

Do i need to reload level, or use it in packaged game only in order to load those files?

I have the same question. I can load the assets only one way.
PakFile.SetMountPoint(FPaths::EngineContentDir());
… …
UObject* LoadObject = StreamableManager.SynchronousLoad(TEXT("/Engine/AssetName.AssetName"));
loadObject is the asset, but LoadErrors: ‘/Game/materialName.uasset’ reference from AssetName