# Tutorial: Example Project: Loading Pak Files At Runtime

**URL:** <https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136>\
**Category:** Tutorial & Course Discussions\
**Tags:** unreal-engine\
**Created:** [September 7, 2023, 5:47pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136 "2023-09-07T17:47:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikeweiss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeweiss/32/982456_2.png) [@mikeweiss](https://forums.unrealengine.com/u/mikeweiss)\
**Post date:** [September 7, 2023, 5:47pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/1 "2023-09-07T17:47:26Z")

</div>

The PakDemo project demonstrates a standalone application created by an Unreal Engine Project that can load assets from a .pak file from the local filesystem or addressable path cooked in a separate project. This tutorial will walk through the provided sample of the PakTestContent project which will generate the Pak file and the PakDemo project which will load the Pak file at runtime.  
  
[https://dev.epicgames.com/community/learning/tutorials/7Bj8/unreal-engine-example-project-loading-pak-files-at-runtime](https://dev.epicgames.com/community/learning/tutorials/7Bj8/unreal-engine-example-project-loading-pak-files-at-runtime)

---

<div class="post-metadata">

**Author:** ![mikeweiss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeweiss/32/982456_2.png) [@mikeweiss](https://forums.unrealengine.com/u/mikeweiss)\
**Post date:** [September 27, 2023, 2:23pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/2 "2023-09-27T14:23:06Z")

</div>

I found out that I was missing the windows build for the Pak file loader project, alluded to early in the tutorial. Apologies for that. I have updated the project zip files to remedy the situation. Thanks for the feedback!

---

<div class="post-metadata">

**Author:** ![DarkiRuiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkiRuiz](https://forums.unrealengine.com/u/DarkiRuiz)\
**Post date:** [October 10, 2023, 11:37am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/3 "2023-10-10T11:37:55Z")

</div>

This tutorial has been very useful for me to get started with Pak files, but there are still a couple things I would like to ask because I haven’t been able to find much more information on the subject, specially up to date with the latest versions.

With this we can load UAsset files from a Pak, which can be used to import pretty much any kind of object, actors, components, etc. But how about UMap files? Let’s say I want to import a whole level with its contents.

I tried adding one into the PakTestContent project (I placed it in pakTest/Core as well) and rebuilt the Pak. I also tinkered a bit with the PakDemo project to try and load this level. I modified the “GetPakContent” function to include UMaps and made sure that the Pak did include it, but after that, the little stuff I found online simply stated that once the Pak was mounted I could “OpenLevel” into it.

I tried, but this fails with a “Failed to load package” error popup that closes the game. As I said, the level is listed as included in the Pak, so I’m kinda stuck here.

---

<div class="post-metadata">

**Author:** ![Arimaldi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Arimaldi](https://forums.unrealengine.com/u/Arimaldi)\
**Post date:** [October 11, 2023, 2:19am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/4 "2023-10-11T02:19:33Z")

</div>

Hi @mikeweiss,

Firstly, thank you so much for your tutorial and the material.

I’m very interested in this topic, and my case is similar to the case explained by @DarkiRuiz.

In my case, before changing the code, I tried to package the solution that you are sharing and execute the new packaged output. But, it crashes in the spawning step and the application is closed.

Could you help us with this?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![evanzbg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@evanzbg](https://forums.unrealengine.com/u/evanzbg)\
**Post date:** [October 18, 2023, 1:20am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/5 "2023-10-18T01:20:25Z")

</div>

Hi @mikeweiss, thank you for the tutorial! I have a question regarding using pak files in the editor. I have a pak filled with animations that I am able to mount, load, and use in the editor, but I am running into crashes when closing the editor during the RemovePlatformFile function in PlatformFileManager. I’ve looked through source and the forums and seem to be finding some mixed messages regarding pak file usage in the editor so I was just wondering if you had any insight?

---

<div class="post-metadata">

**Author:** ![Tomtom2M](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tomtom2M](https://forums.unrealengine.com/u/Tomtom2M)\
**Post date:** [December 10, 2023, 9:13pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/6 "2023-12-10T21:13:22Z")

</div>

I’m curious about this too.

Did you succeed to load a complete “external” level?

---

<div class="post-metadata">

**Author:** ![gis3d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gis3d1](https://forums.unrealengine.com/u/gis3d1)\
**Post date:** [December 13, 2023, 2:05pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/7 "2023-12-13T14:05:39Z")

</div>

I make a problem when the scene have a large models .

 ![79a20720cbd2563dd1b878d087fa817](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/f/9af64d6cb3aa1db82c4e99c911c4950469f91872.jpeg)  
if no models it used ok

---

<div class="post-metadata">

**Author:** ![FutureCake](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/futurecake/32/1085599_2.png) [@FutureCake](https://forums.unrealengine.com/u/FutureCake)\
**Post date:** [March 19, 2024, 3:01am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/8 "2024-03-19T03:01:12Z")

</div>

No it’s a different reason. It doesn’t work with nanite meshes that weren’t rendered before mounting at the moment. I am trying to fix this as well. Changing levels also doesn’t work anymore after mounting

---

<div class="post-metadata">

**Author:** ![Xrenyn\_the\_Mage](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xrenyn\_the\_Mage](https://forums.unrealengine.com/u/Xrenyn_the_Mage)\
**Post date:** [May 3, 2024, 4:09pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/9 "2024-05-03T16:09:17Z")

</div>

I managed to get map loading from pak files to work, but all materials are replaced by Unreal’s default material and it also doesn’t work for maps with Nanite-enabled meshes.

For simple levels with nothing in them except maybe a sky and some boxes, it should be enough to modify your GetPakContent method to return umaps instead of uassets, take one of those pak content paths, throw it into Conv\_PakContentPathToReferenceString to get its reference string and use that together with `UGameplayStatics::OpenLevel` to actually load it.

However, this doesn’t work if the map contains references to engine content. You can check if that is the case by unpacking the pak file containing your map and the assets it depends on with the UnrealPak tool located in the Unreal Engine’s Binaries folder. You can do this on Linux like so (on Windows it’s probably the same except you call UnrealPak.exe or something):

```auto
<your-unreal-installation-directory>/Engine/Binaries/Linux/UnrealPak -Extract <path/to/your/pakfile>/pakchunk1-Linux.pak" <output-path>

```

If the output folder only contains assets and folders from _inside_ your project’s content directory, you’re golden. If it instead contains a folder called “Engine” and one whose name is your project name, you know your map has engine dependencies and you need to adapt the code a bit to get it to work with those kinds of pak files.

The first problem you will run into is that the aforementioned “Engine” folder can also contain Content folders, which might be registered as mount points _instead_ of your game’s Content folder rather than additionally to it. You can mitigate this by modifying `GetPakMountContentPath` so that it returns a `TSet<FString>` of all the content paths instead of just an FString with the first one it can find, and obviously you need to change `MountAndRegisterPak` as well to register mount points for all these content folders instead of just the first one.

The second problem you might encounter is that `Conv_PakContentPathToReferenceString` may return incorrect reference paths. You need to make sure that this function takes into account the fact that both your pak file’s mount point and the file paths you get from `GetPakContent` will be different if your map has engine dependencies. Trial and error will get you there, as long as you keep in mind that reference strings need to look something like this: `/Game/SomeFolderInYouUnrealProject/YourMap.YourMap`  
and not like that:  
`/Game/YourProjectName/Content/SomeFolderInYouUnrealProject/YourMap.YourMap`. At least that was an issue for me, but maybe I just refactored things wrong.

Sorry I can’t share any of my source code, btw. I’ve re-written the sample project’s code from scratch for a proprietary software project and I’m not allowed to post that here on the internet, but posting small code fragments doesn’t make any sense either because my code is structured in a completely different way than the example project. I still hope that my hints can be of use to you.

Anyway, I’d also quite appreciate an update to this guide with support for loading maps from pak files, with and without engine dependencies, with and without nanite-enabled meshes.

---

<div class="post-metadata">

**Author:** ![kwilson4231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kwilson4231](https://forums.unrealengine.com/u/kwilson4231)\
**Post date:** [May 24, 2024, 6:14pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/10 "2024-05-24T18:14:57Z")

</div>

> [@Xrenyn\_the\_Mage](#):
>
> blem you will run into is that the aforementioned “Engine” folder can also contain Content folders, which might be registered as mount points _instead_ of your game’s Content folder rather than additionally to it. You can mitigate this by modifying `GetPakMountContentPath` so that it returns a `TSet<FString>` of all the content paths instead of just an FString with the first one it can find, and obviously you need to change `MountAndRegisterPak` as well to register mount points for all these content folders instead of just the first one.
> 
> The second problem you might encounter is that `Conv_PakContentPathToReferenceString` may return incorrect reference paths. You need to make sure that

I’ve tried following along with what you have posted and what’s in that demo and I’m still stuck loading a map from a pak file from another project… I have code that goes through the loaded pak file and just grabs the first .umap it finds and tries to load it. I’m running it through Con\_PakContentPathToReferenceString like you said and the path looks right. But it still tells me it can’t find that map:

LogPakFile: Display: Mounted Pak file ‘…/…/…/PakLoader/Paks/mypak.pak’, mount point: ‘/Game/’  
LogPackageName: FPackageName: Mount point added: ‘…/…/…/PakTest/Content/’ mounted to ‘/Game/’  
LogTemp: Mounted Pak file successfully: …/…/…/PakTest/Content/  
LogTemp: Pak file mounted successfully.  
LogTemp: MountPoint …/…/…/PakTest/Content/  
LogTemp: Loading level: /Levels/Exterior.umap  
LogLevel: Warning: WARNING: The map ‘/Game/Levels/Exterior.Exterior’ does not exist.

```auto
                if (this->MountPakFile(PakSavePath, MountPoint))
                {
                    UE_LOG(LogTemp, Log, TEXT("Pak file mounted successfully."));

                    TArray<FString> Content = GetPakContent(PakSavePath, false);
                    FString FirstLevel = FindFirstLevel(Content);
                    if (!FirstLevel.IsEmpty())
                    {
                        UE_LOG(LogTemp, Log, TEXT("Loading level: %s"), *FirstLevel);

                        const FString FileName = Conv_PakContentPathToReferenceString(FirstLevel, MountPoint);
                        UGameplayStatics::OpenLevel(this, FName(FileName));
                    }
                    else
                    {
                        UE_LOG(LogTemp, Warning, TEXT("No level found in the pak file."));
                    }
                }
                else
                {
                    UE_LOG(LogTemp, Error, TEXT("Failed to mount Pak file: %s"), *PakSavePath);
                }

```

---

<div class="post-metadata">

**Author:** ![kwilson4231](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kwilson4231](https://forums.unrealengine.com/u/kwilson4231)\
**Post date:** [June 17, 2024, 6:46pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/11 "2024-06-17T18:46:55Z")

</div>

Still stuck on this. Any thing I can try? Any more information I could provide that would be helpful?

---

<div class="post-metadata">

**Author:** ![Ramedons](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ramedons](https://forums.unrealengine.com/u/Ramedons)\
**Post date:** [September 11, 2024, 8:45am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/12 "2024-09-11T08:45:36Z")

</div>

Hi, I’ve encountered a similar situation to yours. Have you made any progress on this issue?

---

<div class="post-metadata">

**Author:** ![slickathickat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@slickathickat](https://forums.unrealengine.com/u/slickathickat)\
**Post date:** [September 15, 2024, 7:42pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/13 "2024-09-15T19:42:51Z")

</div>

Hi, I can’t start/compile the PakDemo project using UE 5.4.2.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/e/38e46c481837848833a4d925b92ba11e1b0902b6.png)

I’m a beginner at UE/C++ so I’m not quite sure how to fix this.  
After some googling I could get a Win64 Development Build to complete successfully from VSCode, by setting DefaultBuildSettings = BuildSettingsVersion.V5 inside PakDemo.Target.cs and PakDemoEditor.Target.cs  
However, the same error as in the picture is still given when choosing yes to rebuild PakDemo now when starting the project.

The BuildSettingsVersion.V5 worked for compiling some old UE5.2 projects with 5.4.2, but I really have no idea what I’m doing…  
I would be very happy for any help as I would really like to learn this topic.  
Thanks

---

<div class="post-metadata">

**Author:** ![mikeweiss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeweiss/32/982456_2.png) [@mikeweiss](https://forums.unrealengine.com/u/mikeweiss)\
**Post date:** [September 30, 2024, 11:06pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/14 "2024-09-30T23:06:08Z")

</div>

Update: There are some code changes in the PakFileReader(UpdatedCodebase\_Oct2024).zip archive on box. The Blueprint functions are the same, but the underlying code has been modified a bit.

We plan to update the project demo in the coming weeks so stay tuned for an updated version. We have it working in 5.4 internally,

---

<div class="post-metadata">

**Author:** ![slickathickat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@slickathickat](https://forums.unrealengine.com/u/slickathickat)\
**Post date:** [October 2, 2024, 8:29pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/15 "2024-10-02T20:29:37Z")

</div>

Thanks! Looking forwards to the updated demo as this is quite a difficult topic to learn.

---

<div class="post-metadata">

**Author:** ![NicolasDev84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NicolasDev84](https://forums.unrealengine.com/u/NicolasDev84)\
**Post date:** [November 6, 2024, 9:45am UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/16 "2024-11-06T09:45:39Z")

</div>

Hello,

thank you for the tutorial. On my side, I encountered problems (posted [here](https://forums.unrealengine.com/t/how-to-mount-pak-files-without-breaking-the-loading-of-other-assets/2104846)) when generating the pak files from a project using a different name from the main application. So I finally used a project with the same name, but it appears to be a workaround… Is there a cleaner solution?

---

<div class="post-metadata">

**Author:** ![Raja.Haris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/raja.haris/32/1191940_2.png) [@Raja.Haris](https://forums.unrealengine.com/u/Raja.Haris)\
**Post date:** [December 27, 2024, 7:42pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/17 "2024-12-27T19:42:35Z")

</div>

There is no point if you cannot load maps, maps are what tie every other asset together.

---

<div class="post-metadata">

**Author:** ![hyperik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hyperik](https://forums.unrealengine.com/u/hyperik)\
**Post date:** [June 16, 2025, 2:31pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/18 "2025-06-16T14:31:44Z")

</div>

Is there any update on this new version of the Runtime Pak Loading?

Also does/will this implementation support loading levels/maps from Pak as well?

---

<div class="post-metadata">

**Author:** ![mikeweiss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeweiss/32/982456_2.png) [@mikeweiss](https://forums.unrealengine.com/u/mikeweiss)\
**Post date:** [June 24, 2025, 8:05pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/19 "2025-06-24T20:05:01Z")

</div>

Hey all, to address a few things related to this tutorial:

- I posted this elsewhere in a response to an open question. The IO Store option was not in scope for the project. It would take some development work to extend support for IO Store. This tutorial was intended to be a basic starting point where folks could pick up and extend that foundation. That being said, if someone solves that I am happy to extend the tutorial and share the code to the community.
- Maps are not able to be packaged into a PAK file. Maps are the core application so the content belongs in Paks and the logic belongs in the maps in the main application. My colleague has documented a knowledge base that extends the information on this tutorial. [This and more details can be found here](https://dev.epicgames.com/community/learning/knowledge-base/D7nL/unreal-engine-primer-loading-content-and-pak-files-at-runtime#limitationsonloadingexternalassetsatruntime).
- I updated the Box link to the project as it was broken. Apologies for that.
- The [Lyra sample project](https://dev.epicgames.com/documentation/en-us/unreal-engine/lyra-sample-game-in-unreal-engine#lyraframeworksystems) shows how to use content plugins to package your content for Paks.
- I’d highly recommend content plugins so much that [I wrote a tutorial on it](https://dev.epicgames.com/community/learning/tutorials/Y5Zm/creating-a-content-only-plugin-in-unreal-engine).
- If I didn’t address your question here it is because I don’t have an answer, but I did read your question and if I have an answer I will come back at some point.

---

<div class="post-metadata">

**Author:** ![Lucky-Patt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lucky-Patt](https://forums.unrealengine.com/u/Lucky-Patt)\
**Post date:** [July 7, 2025, 2:38pm UTC](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136/20 "2025-07-07T14:38:23Z")

</div>

Hello @MikeWeiss,  
Thank you very much for your plugin — it’s extremely useful!  
I had a question regarding DataTables: is it possible to load them from a .pak file?  
I’m not sure how to go from the **Load Pak Obj Class Reference** node to actually accessing the DataTable.  
Thanks again for your tool.

Best regards,  
Tsad

[Next page](https://forums.unrealengine.com/t/tutorial-example-project-loading-pak-files-at-runtime/1287136.md?page=2)
