Game is packaged with Paks even though it should not

When I am packing the game it creates Pak files even though in Project Settings / Project / Packaging / Use Pak File is unchecked.

For packing I am using Platforms / Windows / Package Project with Use Project Settings checked.

I am using Unreal Engine 5.6.1

Try using "Project Launcher“ instead.

I was using Project Launcher until “5.6”, but now that “Loose files” is marked as legacy, I tried to get to learn the other way as well, in case the option to not use “Pak files” might be removed in the future from inside it.

Now with 5.7 launch I tried Project Launcher again but I get the following error, even on a new project:

********** COOK COMMAND COMPLETED **********
Deployment Context **************
ProjectFile = D:\Game Tests\Unreal Engine Projects\MyProject2\MyProject2.uproject
ArchiveDir = F:\ProgramUse\Unreal Engine\Packaged Projects\Windows
IsCodeBasedUprojectFile = True
DedicatedServer = False
Stage = False
StageTargetPlatform = Win64
InputRootDir = E:\Program Files\Epic Games\UE_5.7
InputProjectDir = D:\Game Tests\Unreal Engine Projects\MyProject2
PlatformDir = Win64
StagedOutputDir = (null)
ShortProjectName = MyProject2
ProjectArgForCommandLines = -project="D:/Game Tests/Unreal Engine Projects/MyProject2/MyProject2.uproject"
RunRootDir = E:\Program Files\Epic Games\UE_5.7
RunProjectDir = D:\Game Tests\Unreal Engine Projects\MyProject2
PakFileInternalRoot = ../../../
PlatformUsesChunkManifests = False
End Deployment Context **************
********** ARCHIVE COMMAND STARTED **********
Archiving to F:/ProgramUse/Unreal Engine/Packaged Projects
Deployment Context **************
ProjectFile = D:\Game Tests\Unreal Engine Projects\MyProject2\MyProject2.uproject
ArchiveDir = F:\ProgramUse\Unreal Engine\Packaged Projects\Windows
IsCodeBasedUprojectFile = True
DedicatedServer = False
Stage = False
StageTargetPlatform = Win64
InputRootDir = E:\Program Files\Epic Games\UE_5.7
InputProjectDir = D:\Game Tests\Unreal Engine Projects\MyProject2
PlatformDir = Win64
StagedOutputDir = (null)
ShortProjectName = MyProject2
ProjectArgForCommandLines = -project="D:/Game Tests/Unreal Engine Projects/MyProject2/MyProject2.uproject"
RunRootDir = E:\Program Files\Epic Games\UE_5.7
RunProjectDir = D:\Game Tests\Unreal Engine Projects\MyProject2
PakFileInternalRoot = ../../../
PlatformUsesChunkManifests = False
End Deployment Context **************
==============================================================================
System.NullReferenceException: Object reference not set to an instance of an object.
   at AutomationTool.Platform.GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
   at AutomationScripts.Project.CreateArchiveManifest(ProjectParams Params, DeploymentContext SC) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\ArchiveCommand.Automation.cs:line 26
   at AutomationScripts.Project.Archive(ProjectParams Params) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\ArchiveCommand.Automation.cs:line 71
   at BuildCookRun.DoBuildCookRun(ProjectParams Params) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 262
   at BuildCookRun.ExecuteBuild() in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
   at AutomationTool.BuildCommand.Execute()
   at AutomationTool.BuildCommand.ExecuteAsync()
   at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
   at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
   at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies)
(see C:\Users\user\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+Program+Files+Epic+Games+UE_5.7\Log.txt for full exception trace)

NullReferenceException: Object reference not set to an instance of an object.
   at AutomationTool.Platform.GetFilesToArchive(ProjectParams Params, DeploymentContext SC)
   at AutomationScripts.Project.CreateArchiveManifest(ProjectParams Params, DeploymentContext SC) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\ArchiveCommand.Automation.cs:line 26
   at AutomationScripts.Project.Archive(ProjectParams Params) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\ArchiveCommand.Automation.cs:line 71
   at BuildCookRun.DoBuildCookRun(ProjectParams Params) in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 262
   at BuildCookRun.ExecuteBuild() in E:\Program Files\Epic Games\UE_5.7\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 43
   at AutomationTool.BuildCommand.Execute()
   at AutomationTool.BuildCommand.ExecuteAsync()
   at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
   at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands)
   at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies)
==============================================================================
AutomationTool executed for 0h 3m 29s
AutomationTool exiting with ExitCode=1 (Error_Unknown)

Why is that, and how can I fix it?

Hello there!

Checking around the community, this is quite a tricky scenario.

First, the fact that you are disabling Paks in 5.6, yet the files are created anyway. This seems to be a recurring problen when using Windows pack settings. Most user use Development Package as a workaround. Alternatively, the Loose Files option might be legacy in 5.6, but it’s still fully supported in 5.5. If you can afford the rollback, you should be able to get the build working with no Pak using that option.

Now, for the 5.7 error. This engine version was released days ago, and might still be prone to unexpected behaviours. Following just the error, I would test using package project instead, and make sure that Stage is enabled, and that it runs before Archive.

Also, it’s always recommended to review the UE docs tied to the issue, just in case:

Over the years Unreal Engine moved more towards containers then loose files, and because of that I would say that you try to get used to that system.

What I would suggest is that you should try is to use the Generate Chunks setting. To enable it in newer engines, go in Project Settings / Packaging / Packaging (yeah, same name internal label) and check these 3:

  • Use Pak File
  • Use Io Store
  • Generate Chunks

By doing this, you can separate each folder to its own group.

For that you need to go though each folder you want to separate in its own chunk and create an asset from Miscellaneous / Data Asset / Primary Asset Label. For each of them, you need to set a unique ID (or you can set the same ID, if you want 2 or more folders to be packaged into the same chunk), then check Apply Recursively, Label Assets in My Directory, Is Runtime label, Include Redirectors, and for Cook Rule select Always Cook.

Any folder that does not contain a Primary Asset Label file will be added inside chunk 0.

With this you can still have some control over packaging, and not have every file under one container, if you wanted to avoid adding an update of 1 MB and have your players download a few GB (if the store fails it deduplication checks, or the store does not have one).