Dynamic loading assets

I don’t understand the official website documentation well。So I want to know if there are any examples for us to learn.Or anyone could tell me about the details to handle it.Thanks so much.

There are quite some resources out there that should help you start with async loading you assets:

If there is something that you do not understand I can gladly put some light on it ^^. Drop me a comment if you have some struggles.

MAY I ask if I were to judge the availability of the resources in the project, when the resource exists in the project, and immediate loading, how to do it?

What do you mean by ‘judge the availability of the resources’? Do you mean how you can ensure to package an asset to be able to async load it later on?

I am so sorry about my poor english.i was try to say ,for example, I want to load some StaicMesh into the game,but them don’t exist in my project.I may put the stacicMesh resources into the project later while the game is running,how can the staticMesh loaded at that time.

No problem :D. I’m here to help ^^.

So from what I understand you want to load an external asset at run-time into your game. This can be accomplished using pak files. Those files are group pf packaged assets that you can mount to Unreals internal file system and load at run-time,

There are several threads that will give you the required information about how to load and create those files:

It’s not an easy topic so take it with calm ^^

Thank you so much.it’s exactly what I want!
I read the information that you post,I am still confused about how to create PAK files.
I should put “UnrealPak.exe OutPak.pak myasset.uasset anotherasset.uasset mymap.umap” somewhere in my code?

You will have to create your pak files from outside your game code. Remember to reaccept the answer :smiley: it get’s unaccepted every time :stuck_out_tongue:

Hi Moss~
Thanks for your help!
I can get the asset names from pak file now,and I add them with “/Engine/” to a Tarray of FStringReference , but “Cast < UMaterialInterface > (stream->SynchronousLoad ( MyStringReference ))” always return Null. Do you konw why?

@moss: Were you able to load a umap or blueprint that is mounted from a Pak file?

There is nothing about, how to load a umap or blueprint from a mounted location, on the internet or in the UE documentation.