WordPress WooCommerce Themes

Cross-Project DLC (Pak) Loading | Unreal Engine 5 Advanced Tutorials

Our Approach

Learn how to build DLCs (UE paks) like Steam or Android downloadable content.

Cross-Project Setup (Main & DLC Projects)
Export Package as Chunked Paks (DLCs)
Loading Different Paks which Exported From Other Projects

Pre-Requisite

🎁 Download & Install Necessary Plugin

✨ Basic C++ Knowledge

Get Started!

✅ Prepare "RootProject" & "ChildProjectForDLC"

.\RunUAT.bat BuildPlugin -plugin="C:\XXXXXXXX\XXXXX.uplugin" -package="C:\XXXXXXXX"

Example: .\RunUAT.bat BuildPlugin -plugin="D:\_Cyrus\2_Plugin_Original\Custom\Sketchfab\Sketchfab.uplugin" -package="D:\_Cyrus\2_Plugin_New\Custom\Sketchfab"

The 1st slot needs point to that “.uplugin” file

And the 2nd slot is export folder, a root folder that will include all files

* In single line

✅ Project Settings for "RootProject"

.\RunUAT.bat BuildPlugin -plugin="C:\XXXXXXXX\XXXXX.uplugin" -package="C:\XXXXXXXX"

Example: .\RunUAT.bat BuildPlugin -plugin="D:\_Cyrus\2_Plugin_Original\Custom\Sketchfab\Sketchfab.uplugin" -package="D:\_Cyrus\2_Plugin_New\Custom\Sketchfab"

The 1st slot needs point to that “.uplugin” file

And the 2nd slot is export folder, a root folder that will include all files

* In single line

✅ Project Settings for "ChildProjectForDLC"

.\RunUAT.bat BuildPlugin -plugin="C:\XXXXXXXX\XXXXX.uplugin" -package="C:\XXXXXXXX"

Example: .\RunUAT.bat BuildPlugin -plugin="D:\_Cyrus\2_Plugin_Original\Custom\Sketchfab\Sketchfab.uplugin" -package="D:\_Cyrus\2_Plugin_New\Custom\Sketchfab"

The 1st slot needs point to that “.uplugin” file

And the 2nd slot is export folder, a root folder that will include all files

* In single line

✅ "ChildProjectForDLC" - Create SubFolder to Include all DLC files

.\RunUAT.bat BuildPlugin -plugin="C:\XXXXXXXX\XXXXX.uplugin" -package="C:\XXXXXXXX"

Example: .\RunUAT.bat BuildPlugin -plugin="D:\_Cyrus\2_Plugin_Original\Custom\Sketchfab\Sketchfab.uplugin" -package="D:\_Cyrus\2_Plugin_New\Custom\Sketchfab"

The 1st slot needs point to that “.uplugin” file

And the 2nd slot is export folder, a root folder that will include all files

* In single line

✅ "RootProject" - Create a Subsystem with Above Code

.\RunUAT.bat BuildPlugin -plugin="C:\XXXXXXXX\XXXXX.uplugin" -package="C:\XXXXXXXX"

				
					/**
	 * Input the full path of the pak file to mount and register it. E.g. C:\...\MyGame\Content\Paks\MyPak.pak
	 * @param InPakFilename "C:\_EduTec\_Pk\DLCs\Windows\DebugDLCs\Content\Paks\pakchunk1-Windows.pak" 
	 * @return 
	 */
	UFUNCTION(BlueprintCallable, Category = "DLCs|Debug")
	bool DebugMountDLC(const FString& InPakFilename);
				
			
				
					bool UDLCsSubsystem::DebugMountDLC(const FString& InPakFilename)
{
	// Try to mount(Load) the pak file, by input the absolute path of the pak file. E.g. C:\...\MyGame\Content\Paks\MyPak.pak
	if (UC3_KBP_Paks_FL::MountAndRegisterPak(InPakFilename))
	{
		// Log
		UC3_KBP_General_FL::FL_PrintString_Lite(this, "Pak file mounted successfully.");

		// Iterate over the content of the pak file
		for (const FString& IterContentAsset : UC3_KBP_Paks_FL::GetPakContentList(InPakFilename))
		{
			// Log
			UC3_KBP_General_FL::FL_PrintString_Lite(this, "Iter Content Asset: " + IterContentAsset);

			// Action Part: Find out the asset you want to do something with
			if (IterContentAsset.Contains("L_TestPakLevel_1"))
			{
				// Load this asset as a level
				const FName TempLevelName = UC3_KBP_Paks_FL::LoadAssetAsLevelName(IterContentAsset);

				// Log
				UC3_KBP_General_FL::FL_PrintString_Lite(this, "Found the level asset with LevelName: " + TempLevelName.ToString());
				
				// Load this asset as a level
				// Make sure the level path (e.g. “/Game/DLC_1/L_TestPakLevel_1.L_TestPakLevel_1”) is correct and matches the actual level asset in your project.
				UGameplayStatics::OpenLevel(this, TempLevelName, true);
				
				return true;
			}
		}
	}
	
	return false;
}

				
			

Example: .\RunUAT.bat BuildPlugin -plugin="D:\_Cyrus\2_Plugin_Original\Custom\Sketchfab\Sketchfab.uplugin" -package="D:\_Cyrus\2_Plugin_New\Custom\Sketchfab"

The 1st slot needs point to that “.uplugin” file

And the 2nd slot is export folder, a root folder that will include all files

* In single line

✅ RootProject: Add this BP into EntryLevel

Note that need to change the input field "InPakFilename" param to your DLC's .pak

✅ RootProject & ChildDLC: Package Both -> Open Root .exe -> Will See Change Level after 5s

Wait around 1 mins until successful message show

💾 Project Files

🎁 Download Necessary Plugin

📥 Download UProject

Want to have Step by Step Tutorial?

FAQ

❌ Target Platform Error

Go to Unreal Engine forum, there is a detail step to guide you

Open .uplugin file in Notepad, delete the useless Target Platform

In UE4 it should look like:

				
					,
"WhitelistPlatforms": [
	"Win64",
	"Mac"
]
				
			

In UE5 it should look like:

				
					,
"PlatformAllowList": [
	"Win64",
	"Mac"
]
				
			

Related Articles