Packaging & Platform Settings
A game isn't finished until it runs outside the editor. Packaging turns the project into a standalone build: it compiles the game for the target platform, cooks content (converts assets to the platform's optimized formats and drops editor-only data), stages files into a folder, and packages them into .pak / IoStore container files.
Package early and often. Problems that only appear in packaged builds (missing assets, editor-only code, different load order) are cheap to fix in week two and expensive in the last week.
Build configurations
| Configuration | Use |
|---|---|
Debug / DebugGame |
debugging (engine or just game unoptimized) |
Development |
daily testing; console, stat commands, logging and asserts on |
Test |
like Shipping, with some profiling hooks: for performance testing |
Shipping |
release: optimized, no console, no check, minimal logging |
Editor builds are separate targets (Development Editor); a game package uses Game (or Client/Server) targets.
Packaging from the editor
- Project Settings → Maps & Modes: set the Game Default Map.
- Project Settings → Packaging: build configuration, Use Pak File / Use Io Store, List of maps to include (or Cook everything in the project content directory, which is simpler but bigger), Additional Asset Directories to Cook for assets loaded only by path.
- Platforms (toolbar) → Windows → Package Project, pick an output folder.
- Run the
.exefrom the output folder, then checkSaved/Logsnext to it if anything is wrong.
Packaging from the command line: RunUAT BuildCookRun
Build machines use the Unreal Automation Tool (UAT) directly. BuildCookRun does every step the editor does:
"C:\Program Files\Epic Games\UE_5.5\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun ^
-project="D:\Projects\Arena\Arena.uproject" ^
-platform=Win64 -clientconfig=Shipping ^
-build -cook -stage -pak -iostore -archive ^
-archivedirectory="D:\Builds\Arena" ^
-noP4 -utf8output| Flag | Does |
|---|---|
-project= |
the .uproject |
-platform= / -clientconfig= |
target platform and configuration (-serverconfig=, -server for a dedicated server) |
-build |
compile the game targets (-skipbuild to reuse binaries) |
-cook |
cook content (-iterate for incremental cooking) |
-stage / -pak / -iostore |
stage files, put them into pak files, use IoStore containers |
-archive -archivedirectory= |
copy the final build to a folder |
-map= |
cook only these maps (-map=L_Arena_01+L_Arena_02) |
-noP4 |
don't touch Perforce (for Git-based teams) |
On Linux and macOS the script is RunUAT.sh. Epic's docs also describe Turnkey (RunUAT Turnkey), which wraps SDK setup and building for platforms, and BuildGraph scripts for full pipelines (compile, cook, test, deploy) on CI systems such as Jenkins, TeamCity or Horde.
Platform settings worth checking
- Project Settings → Platforms → Windows: default RHI (DirectX 12 / 11 / Vulkan), splash screens, icon.
- Project → Description: project name, company, version (shown in crash reports and the window title).
- Engine Scalability: per-quality settings in
DefaultScalability.ini; expose them in an options menu withUGameUserSettings. - Device Profiles (
DefaultDeviceProfiles.ini): per-platform and per-device CVars, especially on mobile and consoles. - Shader Pipeline Cache / PSO precaching: avoids hitches the first time a material is drawn. UE 5.x has PSO precaching enabled by default on DX12; test a fresh build on a fresh machine to see first-run hitches.
- Crash Reporter: Include Crash Reporter in Packaging settings, and keep the debug symbols (
.pdbfiles) for every build you ship, or crash call stacks will be unreadable.
A model: what the cook includes
The cooker starts from the maps and directories you list and follows hard references to everything they need. Anything referenced only by a soft path or loaded by name at runtime is missing from the package unless you add it explicitly. This model walks a small reference graph the way the cooker does.
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
struct Ref { std::string To; bool Hard; };
void Cook(const std::string& asset, const std::map<std::string, std::vector<Ref>>& refs, std::set<std::string>& cooked) {
if (!cooked.insert(asset).second) return;
auto it = refs.find(asset);
if (it == refs.end()) return;
for (const Ref& r : it->second)
if (r.Hard) Cook(r.To, refs, cooked); // soft references are NOT followed
}
int main() {
std::map<std::string, std::vector<Ref>> refs = {
{"L_Arena_01", {{"BP_ArenaGameMode", true}, {"BP_Enemy", true}, {"L_Arena_02", false}}},
{"BP_ArenaGameMode", {{"BP_ArenaCharacter", true}, {"WBP_HUD", true}}},
{"BP_ArenaCharacter", {{"SK_Hero", true}, {"GA_Dash", true}}},
{"BP_Enemy", {{"SK_Grunt", true}, {"BT_Enemy", true}, {"SK_Boss_Phase2", false}}},
{"L_Arena_02", {{"BP_Boss", true}}},
};
std::vector<std::string> mapsToCook = {"L_Arena_01"};
std::set<std::string> cooked;
for (const auto& m : mapsToCook) Cook(m, refs, cooked);
std::cout << "cooked " << cooked.size() << " assets:";
for (const auto& a : cooked) std::cout << " " << a;
std::cout << "\nmissing at runtime:";
for (const auto& [asset, list] : refs)
for (const Ref& r : list)
if (!r.Hard && !cooked.count(r.To)) std::cout << " " << r.To << " (soft ref from " << asset << ")";
std::cout << "\n";
}cooked 9 assets: BP_ArenaCharacter BP_ArenaGameMode BP_Enemy BT_Enemy GA_Dash L_Arena_01 SK_Grunt SK_Hero WBP_HUD
missing at runtime: SK_Boss_Phase2 (soft ref from BP_Enemy) L_Arena_02 (soft ref from L_Arena_01)
L_Arena_02 is opened with OpenLevel by name, a soft reference, so it and everything only it uses (the boss) would be missing. Add the level to List of maps to include, and the soft-referenced mesh to an Additional Asset Directory to Cook or the Asset Manager's primary asset rules. The packaged build's log names every asset it failed to load.
Test yourself
What does 'cooking' do?
- Compiles C++
- Converts assets to the target platform's runtime formats and drops editor-only data
- Uploads the game to a store
- Generates the NavMesh
A level loaded by name with OpenLevel is missing from the packaged game. Why?
- OpenLevel doesn't work in Shipping
- Soft (name/path) references aren't followed by the cooker; add the map to the maps to include
- Levels can't be packaged
- The level is too big
Which build configuration removes check() and the console but is meant for release?
- Development
- Test
- Shipping
- DebugGame