How to Load Asset from .pak file?

Hello. My question is:

  1. I want to load new asset from a .pak file, and use the asset at runtime.
  2. I have tried the example at import ressource at runtime - Rendering - Unreal Engine Forums. I copy the code and put a .png file into my project content folder, but it doesn’t work.
  3. What kind of file should be package into a .pak file? I have tried to use unrealPak.exe to package a .uasset file(which is a static mesh in engine). Is it right?
  4. Is there any other way to load asset from .pak file?

Best Regards.

same question here!

GIsAutomationTesting = true;
AssetToolsModule.Get().ImportAssets(files, destpath);
GIsAutomationTesting = false;
mesh = Cast(StaticLoadObject(UStaticMesh::StaticClass(), 0, *(destpath+"/"+ PakGuid+"."+ PakGuid)));