This page provides an overview of packaging key concepts, and tutorials for cooking and packaging. To skip to the tutorials, see Let’s Cook Content and Let’s Package a Project.
What is Packaging?
Packaging is a process that converts an Unreal Engine project into a standalone executable (.exe
) or application.
The packaging process compiles a project’s content into a format that can run on a target platform such as Windows, iOS, or a console. For example, when you download a game to your machine, the executable and data files that you receive have been packaged to ensure their compatibility with your operating system.
Packaging can occur at multiple stages in the development pipeline:
Production and Testing
During production and testing, packaging can be used to verify a project’s functionality. For example, quality assurance (QA) or testing a packaged project on mobile platforms.
Distribution
During distribution, also called shipping, packaging is used to prepare a final build for release.
Post-Production
During post-production, packaging can be used to distribute content updates, such as downloadable content (DLC) and patches.
A final build is a project that is ready for users or players.
Supported Target Platforms
A target platform is an operating system or console that a project will run on. Unreal Engine supports packaging for the following target platforms:
Desktop platforms, such as Windows, macOS, and Linux.
Mobile platforms, such as iOS, iPadOS, tvOS, and Android.
All major consoles.
XR (extended reality) platforms such as OpenXR, PSVR2, ARKit, ARCore, and visionOS.
Additional Software
Developing and packaging for Windows and macOS does not require any additional software.
Developing and packaging for consoles requires a source code build of the Unreal Engine and cannot use the pre-compiled version obtained through the Epic Games Launcher. You can download a source code build from GitHub.
Developing and packaging for some target platforms, such as Linux, mobile, and XR platforms, may require additional Software Development Kits (SDKs) and Unreal Engine components. For more information on SDKs for your target platform, see Sharing and Releasing Projects. For more information on Unreal Engine components, see Install Unreal Engine.
How Does Packaging Work?
Packaging a project is a build operation. Build, cook, and stage are build operations that contribute to the packaging process.
Build
During this phase, the project’s code, plugins, and binaries are compiled for the target platform. If the project uses C++, all code is compiled into binaries.
Cook
During this phase, the project’s assets (geometry, materials, textures, Blueprints, audio, and more) are saved into a format that can run on the target platform. Assets are optimized to increase load efficiency.
Stage
During this phase, compiled code and cooked content is copied to a staging directory.
A staging directory is a temporary folder on your drive, outside of the development directory, that you designate during the packaging process.
Package
During this phase, compiled code and cooked content is bundled into a distributable set of files inside the staging directory. For example, on Windows, distributable files include an installer or executable and a folder containing Pak (
.pak
) files.(Optional) Deploy
The project is pushed to a target platform where it will run.
(Optional) Run
This phase launches the project from the Unreal Editor on the target platform. This operation is ideal when quickly iterating and testing on a device that is not your local desktop.
Build Operations
While each build operation contributes to the packaging process, they can also be performed independently.
When performed independently, each operation is uniquely useful in different stages of development. For example, the cook operation can optimize and save specific assets instead of every asset in your game level — making it ideal for distributing content updates, such as DLC or patches.
For a comparison of when each build operation is useful, see the table below:
Build Operation | Example Use |
---|---|
Build | Compiling code during development. |
Cook | Preparing a project for QA testing or distribution. Preparing DLC and patches for testing or distribution. |
Stage | Preparing a project for QA testing or distribution. |
Package | Preparing a project for QA testing or distribution. |
Deploy | Testing a project on a platform that is not your local desktop computer, such as console or mobile. |
Run | Testing a project on a platform that is not your local desktop computer. Users running a shipped project on a target platform. |
Cooking Content
Cooking is a build operation that prepares game content so that it can be run outside of the Unreal Editor. It’s performed as part of the packaging process, but can also be performed independently.
Cooking is necessary because it:
Ensures game content is optimized and compatible with the target platform.
Is required before packaging a final build for distribution or testing on a device, such as mobile or console.
Converts editor-only formats into runtime-ready formats.
Runtime refers to the period of time when a project is running on its target platform.
The following tasks are performed during the cooking process:
Assets (geometry, materials, textures, Blueprints, audio, and more) are converted into a platform-specific format.
Assets are compressed and optimized, when possible.
Unused data is not included, in order to reduce the size of the project on disk and improve performance.
Blueprints are compiled into their native code, if necessary.
Maps and Levels are processed and optimized.
Cooked content is stored in one or more Pak (
.pak
) files.
During cooking, optimizing strips out any content that isn’t referenced by the project’s game levels or code. For example, assets that appear in the Unreal Editor’s Content Browser, but not in the game level, won’t be cooked.
When cooking independently, files are copied to the development directory instead of the staging directory.
For more information on the cooking process, see Content Cooking documentation.
Pak Files and Pak File Chunking
A Pak (.pak
) file is an archive file format that Unreal Engine uses to store cooked content. While Pak files are the default file type, you can explore the other archiving file types in the project’s Packaging Settings.
Pak files can be further separated into smaller Pak files, called chunks. When using chunks, you can assign specific assets from your project to a chunk. This is useful in the following situations:
Separating out DLC content or patches that you don’t want included in the fully packaged project.
Streaming installation. Chunks allow for customizing the priority of content that’s downloaded first.
Streaming installation is a way for users to interact with a shipped project before it’s finished installing. This is ideal for console games, allowing players to play the game sooner.
For more information on Pak files and Pak file chunking, see Cooking and Chunking and Preparing Assets for Chunking.
Let’s Cook Content
There are two methods to cook content for a project:
Cooking Method | Description |
---|---|
By the book (default) |
|
On the fly |
|
Cooking by the Book
To cook content by the book, follow these steps:
From the Unreal Editor’s main toolbar, open the Platforms menu.
From the list, select a target platform. This only cooks content for the selected target platform. Under Content Management, click Cook Content.
Once you click Cook Content, a popup dialog will appear in the bottom-right corner of the Unreal Editor. This displays cooking progress and completion or failure states.
While cooking content, the dialog displays Cooking content for [target platform].
Once cooking is complete, the dialog displays Cooking complete!
Cooking on the Fly
To enable cooking on the fly, follow these steps:
From the Unreal Editor’s main toolbar, open the Platforms menu.
In the menu, check the Enable cooking on the fly checkbox.
With cooking on the fly enabled, cooking can now be performed using the same steps as Cooking by the Book.
Build Configurations
In order to package a project, you must choose a build configuration. A build configuration is a preset that determines how your project is compiled, and what code and content is made available.
Each configuration is useful at different stages in development because they prioritize different factors, including:
Performance
Level of optimization
Project file size
Access to debugging tools
For example, the Shipping configuration is ideal for distributing games where players should not have access to game-breaking console commands. Debug and Development, which include console commands, are ideal for optimizing and testing a game during development.
For a comparison of all build configurations, see the table below:
Build Configuration | Description | Development Stage | Example Use |
---|---|---|---|
Debug |
| Development. This configuration is unsuitable for distribution. |
|
DebugGame |
| Development. This configuration is unsuitable for distribution. |
|
Development (default) |
| Development. This configuration is unsuitable for distribution. |
|
Test |
| Used for testing builds internally without full debugging tools overhead. |
|
Shipping |
| Distribution. This configuration is unsuitable for development. |
|
For more information on Build Configurations, see Build Configurations Reference.
Packaging Settings
Presets such as build configurations, and many other options for customizing the packaging process, can be found in Project Settings > Packaging.
This window is accessible from two locations in the Unreal Editor:
From the Editor’s main toolbar, click the Platforms menu. Then, click Packaging Settings.
From the Editor’s menu bar, click Edit > Project Settings. The Project Settings window will open. In the left-hand navigation menu, click Packaging.
The Packaging section includes, but is not limited to, options for:
Custom build presets
Build configurations
Build targets
Debug symbols
Executables
Localization
Compression
Cooking
Configuration files (
.ini
)Shaders
Archive filetypes (Pak, Chunk, Utoc, and Ucas)
Movies (for example, a pre-rendered movie that plays prior to gameplay)
For a detailed explanation of the options available in Packaging, see the Packaging section of Project.
Let's Package a Project
In this tutorial, you’ll learn how to package a project for Windows using the Package build operation and Development build configuration.
You’ll put the theory that you’ve learned in the previous sections into practice by completing the following tasks:
By the end of the tutorial, you will have a game executable that you can run, test, and exit. This workflow mimics what it’s like to put an Unreal Engine game through testing during production.
To complete this tutorial you will need:
A machine running Windows
The Unreal Engine
An Unreal Engine project using the First Person template in the Arena Shooter variant.
Before You Begin
Open your project in the Unreal Editor.
Setting a Game Default Map
The Game Default Map is the map that loads when your packaged project launches. Every project must set a Game Default Map prior to packaging — without it, there’s nothing for the project to load at runtime.
If a Game Default Map is not set, the project will display a black screen when launched. The exception to this rule is when using a project template, which sets a Game Default Map automatically.
You'll change the map in the following steps:
From the Editor’s menu bar, click Edit > Project Settings.
In the Project Settings window, under the Project heading in the left-hand navigation menu, click Maps & Modes.
Expand the Default Maps heading and click the Game Default Map dropdown menu. Search for
Lvl_ArenaShooter
and select it.
You can also set the map by selecting it in the Content Browser, then click the Use Selected Asset from Content Browser icon in the Project Settings window.
Setting a Build Configuration
The build configuration determines how your project is compiled. Every project must have a build configuration set prior to packaging. Unreal Engine will default to the Development configuration unless you change it.
While still in the Project Settings window, click Packaging from the left-hand navigation menu.
Expand the Project heading. Verify that the Build Configuration is set to Development. If it’s not, click the dropdown menu and set it to Development.
By using the Development configuration, you can access the in-game console during runtime. You’ll use the in-game console to execute console commands later in this tutorial.
The in-game console is a command line interface that allows you to interact with the engine during runtime.
Creating a Packaged Project
Packaging creates a standalone executable or application from an Unreal Engine project. In this case, you’ll package for the target platform Windows, and create an executable that you’ll launch later in this tutorial.
To package a project, follow these steps:
In the Editor’s main toolbar, click the Platforms menu. Under Content/SDK/Device Management, you’ll see a list of platforms. For the purpose of this tutorial, select Windows.
Depending on which platform you're developing for, and which SDKs you have installed, the platforms listed under Content/SDK/Device Management can look different.
In the new context menu, under Binary Configuration, verify that Use Project Setting (Development) is selected. The parentheses show which build configuration is currently selected in the packaging settings.
You can quickly change your build configuration from the Platforms menu without going back to Project Settings.
Under Content Management, select Package Project.
In the Package project dialog, choose or create a folder to use as the staging directory on your drive — where the project’s packaged files will be saved. Click Select Folder to confirm the staging directory and initiate the packaging process.
Once the process has begun, a popup dialog called Packaging project for [selected target platform] appears in the bottom-right corner of the Unreal Editor.
At any time during the packaging process, you can open the Output Log by clicking the Show Output Log link on the pop-up dialog. The log window displays tasks that the engine performs during the packaging process, including logging errors.
Once the process is complete, you’ll see one of the following messages indicating that packaging has completed or failed.
(Optional) Canceling the Packaging Process
You can stop the packaging process at any time by clicking the Cancel button on the pop-up dialog.
Once the cancellation is successful, you’ll see the following message in the bottom-right corner of the Unreal Editor.
(Optional) Debugging Packaging Errors
The Output Log and the Message Log both display packaging errors. During the packaging process, you can click the Show Output Log link on the pop-up dialog to open the Output Log.
You can also access either of these logs at any time by clicking Window > Message Log or Window > Output Log from the Editor’s menu bar.
The Output Log
The Output Log is a log of real-time messages from the engine that displays debugging information, compiler messages, warnings, error messages, and event and asset loading details.
Because it’s a real-time log, it can provide additional context clues to what was happening before, during, and after packaging.
The Message Log
The Message Log stores important messages, such as errors and warnings. It can help you identify where to start your debugging investigation. You can look under the Packaging Results heading in the left-hand navigation menu to see any listed errors or warnings you may need to address.
Running and Exiting Your Executable
Once you’ve packaged your project, follow these steps to run, test, and exit it:
Navigate to the folder you specified as your staging directory — where your packaged project files are saved.
The Pak files previously mentioned in this guide can be found in the staging directory under [Project Name] > Content > Paks.
Run your project by double-clicking the executable (
.exe
) file. The executable will have the same name as your Unreal Engine project.When the project loads, you’ll see a windowed version of the Game Default Map. You can now test the executable by moving around the level and interacting with pickups.
To exit your executable, open the in-game console’s command line by pressing the Backtick (`) key. In the command line, type one of the following console commands and press Enter:
quit
exit
Exiting a running executable can differ depending on what type of build configuration you use. For example, if you use the Shipping configuration (which does not have access to the in-game console) your project must include a user interface option, such as a button, to exit from within the application.
For more information about console commands in Unreal Engine, see Console Commands Reference.
Using the Unreal Automation Tool
The Unreal Automation Tool (UAT) is a host program and a set of utility script libraries that can manipulate Unreal Engine projects.
For example, when you package a project, the Automation Tool executes the command BuildCookRun
— the underlying script for all build operations. By completing the Package a Project tutorial, you have already employed the Automation Tool.
The Automation Tool is useful for scripting unattended processes in C#, such as cooking and running automation tests for Continuous Integration (CI) pipelines.
For more information on the UAT, see Automation Tool Overview.
Using the Project Launcher
The Project Launcher is a tool that’s used to create custom Launch Profiles. Custom Launch Profiles give you automated control over the build, cook, package, and deploy operations for multiple platforms in one location. This allows for efficiency and iteration during development and testing.
To access the Project Launcher in Unreal Engine, click the Platforms button in the Editor’s main toolbar. Under Options and Settings, click Project Launcher.
For more information on using the Project Launcher, see Project Launcher.
Project Distribution
Distributing, or shipping, refers to releasing your project for users on digital distribution platforms and occurs near the end of the development pipeline.
Depending on which target platform you’re developing for, many digital distribution platforms are available. For example, projects for desktop platforms can be distributed on the Epic Games Store or Steam. Alternatively, iOS and Android projects can be distributed on the App Store or Google Play Store.
Each digital distribution platform has a unique workflow, requirements, and legal agreements for shipping projects. Shipping an Unreal Engine project to the Epic Games Store comes with certain benefits. For more information about shipping to the Epic Games Store, see Distribute on Epic Games.
For more information about your target platform and associated digital distribution platforms, see Sharing and Releasing Projects.