# \[Crach\] Open a Level from internet Pak File at Run-time

**URL:** <https://forums.unrealengine.com/t/crach-open-a-level-from-internet-pak-file-at-run-time/353524>\
**Category:** Platform & Builds\
**Tags:** load-level, dlc, pak, unreal-engine, question\
**Created:** [April 9, 2016, 10:59am UTC](https://forums.unrealengine.com/t/crach-open-a-level-from-internet-pak-file-at-run-time/353524 "2016-04-09T10:59:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![linqing](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@linqing](https://forums.unrealengine.com/u/linqing)\
**Post date:** [April 9, 2016, 10:59am UTC](https://forums.unrealengine.com/t/crach-open-a-level-from-internet-pak-file-at-run-time/353524/1 "2016-04-09T10:59:59Z")

</div>

I need implement a Feature:

1. .PAK File Download from server at Run-time.
2. Mount PAK File to content At Run-time.
3. Open a Level from PAK File contain content At Run-time.

I encountered The Problem like : [link text](https://answers.unrealengine.com/questions/258386/loading-map-from-pak-at-runtime.html)

My Program downloaded and Mounted Pak File Is complete. Level happen exception when open Level. Like

 ![86039-test1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/7/457eb63c1b15757b5ab7ebc07019b3de5171e99d.jpeg)

a lot of Mesh have error.

But restart the My program after Download .PAK File. once again Open Level is no problem.

 ![86051-test2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/9/659542dc6be71dec48147ec3e1ac238f18ebf2fa.jpeg)

I Package Pak File Ways is follow :

[Add mod-support to your Unreal Engine 4 Game](http://www.tomlooman.com/add-mod-support-to-your-unreal-engine-4-game/)

[Releasing Your Project](https://docs.unrealengine.com/latest/INT/Engine/Deployment/Releasing/)

[Patching](https://docs.unrealengine.com/latest/INT/Engine/Deployment/Patching/index.html)

I think i miss some Step when mount PAK File.

I do not know how solve it ,Who can help me?

my mount PAK File code :

```
if(/** Download Pak File Write Disk is Successful */)
{
	IPlatformFile& InnerPlatformFile = FPlatformFileManager::Get().GetPlatformFile();
	FPakPlatformFile* PakPlatformFile = new FPakPlatformFile();
	PakPlatformFile->Initialize(&InnerPlatformFile, TEXT(""));
		
	FPlatformFileManager::Get().SetPlatformFile(*PakPlatformFile);
    PakPlatformFile->Mount( *temp_filePath, 0,TEXT(""));

	TSet<FString> FileList;
 
	FPakFile pakFile(*temp_filePath, false);

	pakFile.FindFilesAtPath(FileList, *pakFile.GetMountPoint(), true, false, true);

	for (auto item : FileList)
	{
		if (item.EndsWith(FPackageName::GetAssetPackageExtension()) ||
		    item.EndsWith(FPackageName::GetMapPackageExtension()))
		{
		    UE_LOG(LogTemp, Log, TEXT("Test = %s"), *item);
		}
		else
		{
			UE_LOG(LogTemp, Log, TEXT("PakFile Asset Failed : %s"), *item);
		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![6r0m](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/6r0m/32/1194563_2.png) [@6r0m](https://forums.unrealengine.com/u/6r0m)\
**Post date:** [July 31, 2019, 1:49pm UTC](https://forums.unrealengine.com/t/crach-open-a-level-from-internet-pak-file-at-run-time/353524/2 "2019-07-31T13:49:43Z")

</div>

did you implement download pak from server?
