# How to Load Files from a Mounted PAK File?

**URL:** <https://forums.unrealengine.com/t/how-to-load-files-from-a-mounted-pak-file/1235114>\
**Category:** Programming & Scripting\
**Tags:** pak, pak-file, unreal-engine\
**Created:** [July 20, 2023, 8:31pm UTC](https://forums.unrealengine.com/t/how-to-load-files-from-a-mounted-pak-file/1235114 "2023-07-20T20:31:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedVonix](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redvonix/32/599205_2.png) [@RedVonix](https://forums.unrealengine.com/u/RedVonix)\
**Post date:** [July 20, 2023, 8:31pm UTC](https://forums.unrealengine.com/t/how-to-load-files-from-a-mounted-pak-file/1235114/1 "2023-07-20T20:31:25Z")

</div>

I’m able to successfully build a PAK file and inject it into our game - however I’m having issues being able to actually load anything from that PAK file. My code successfully finds all of the expected files in there, however when I go to actually load an asset from the PAK - that’s where I’m getting stuck. I’m not sure if I have the file paths wrong or what. Here’s my code so far for loading assets from the Pak file:

```auto
		TArray<FString> FileList;
		pakPlatformFile->GetPrunedFilenamesInPakFile(PakFileLocation, FileList);
		for(int i = 0; i < FileList.Num(); i++)
		{
			UE_LOG(LogTemp, Warning, TEXT("--- DEBUG PakFile Mount FILE FOUND: %s"), *FileList[i]);

			FString AssetName = FileList[i];
			FString FileName, FileExt;
			
			FSoftObjectPath StrNewAssetRef = AssetName;
			FStreamableManager AssetLoader;
			UObject* NewLoadedObject = AssetLoader.LoadSynchronous(StrNewAssetRef);
			if (NewLoadedObject)
			{
				// do something, cast to compatible type.
				UE_LOG(LogTemp, Warning, TEXT("--- DEBUG Successfully loaded file %s"), *NewLoadedObject->GetName());
			}
			else
			{
				UE_LOG(LogTemp, Warning, TEXT("--- DEBUG FAILED to load file at %s"), *AssetName);
			}
		}

```

There unfortunately isn’t a lot of documentation or information on this topic, so I’ve kind of pieced this together from what I have been able to find, which isn’t much.

My question is: How do you, at runtime, properly load assets from a mounted PAK file so they are available for use in a game?

---

<div class="post-metadata">

**Author:** ![user\_55666de6e05e582ae8774b7f14ce881463bf8c9060602b6a9a2fea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_55666de6e05e582ae8774b7f14ce881463bf8c9060602b6a9a2fea](https://forums.unrealengine.com/u/user_55666de6e05e582ae8774b7f14ce881463bf8c9060602b6a9a2fea)\
**Post date:** [October 9, 2024, 5:30pm UTC](https://forums.unrealengine.com/t/how-to-load-files-from-a-mounted-pak-file/1235114/2 "2024-10-09T17:30:27Z")

</div>

> [@RedVonix](#):
>
> `LoadSynchronous`

did you solve this problem？ i have the same issue.
