跳到正文
Skillpedia
通用编程6.6k · #13857

unreal-packaging

它能做什么

该技能展示如何把 Unreal Engine 5 项目变成可玩的构建版本。适合准备游戏测试版或正式版的开发者。

适用场景

  • ✓当你要为 Unreal Engine 5 项目创建测试版或正式版构建时。
  • ✓当你需要在 Development 和 Shipping 构建之间选择,或设置打包选项时。
  • ✓当你想从命令行自动构建,例如在 CI 系统中时。

技能链接

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/unreal/unreal-packaging/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/unreal/unreal-packaging/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把我的 Unreal 游戏打包为 Windows 版本给测试人员,并确保它能从正确的关卡启动。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能讲解如何设置默认起始地图,选择构建配置,为目标平台烘焙内容,以及从编辑器或命令行运行打包。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Unreal Packaging & Cooking

Turn a UE5 project into a runnable, distributable build: choose the right build configuration, cook content, set the launch map, and package — from the editor or the command line. Targets UE 5.8.

When to use

  • Use when producing a build (test or release), choosing Development vs Shipping, cooking content, configuring Packaging / Maps & Modes settings, or automating builds with RunUAT BuildCookRun for CI.
  • Use when the project has a *.uproject and Config/Default*.ini, and the goal is a packaged player rather than running in-editor.

When not to use: storefront submission/release process → steam-publish / itch-publish. Editor-time gameplay/iteration is not packaging.

Core workflow

  1. Set the launch map. Project Settings → Maps & Modes → Game Default Map is what a packaged build loads first. Wrong/empty here is the most common "packaged game is black" cause.
  2. Pick the build configuration: Development (default; optimized but keeps logging/ stats/console for testing) vs Shipping (all optimizations, debugging tools stripped — for release). DebugGame/Debug are for debugging engine/game code and aren't for distribution; DebugGame isn't available for Blueprint-only projects.
  3. Understand cook vs package. Cooking converts assets to the target platform's format. Staging/packaging copies the compiled executable + cooked content into a standalone, distributable folder, with content in container files (.pak, plus .utoc/.ucas when Use Io Store is on, which is the default). Packaging runs a cook as part of it.
  4. Package from the editor: the Platforms menu → choose the platform (e.g. Windows) → set the Binary Configuration → Package Project → pick an output folder.
  5. Or build from the command line with the Unreal Automation Tool (RunUAT BuildCookRun) for repeatable/CI builds. The Project Launcher (Platforms → Project Launcher) saves the same build/cook/stage/deploy choices as reusable launch profiles.
  6. Tune Packaging settings (Project Settings → Packaging): which maps/directories to cook, full-rebuild, compression, and whether to build all maps.
  7. Validate assets before packaging when UnrealEditor-Cmd is available. Run UnrealEditor-Cmd <Project>.uproject -run=DataValidation (UnrealEditor-Cmd.exe on Windows) and fix every reported validation error before cooking.
  8. Verify by running the packaged build, not just by a successful cook — launch the executable and confirm it loads the right map and runs.

Patterns

1. Editor packaging (the menu path)

Platforms (toolbar)
  -> Windows
     -> Binary Configuration -> Development | Shipping
     -> Content Management -> Package Project
  -> choose/confirm the staging output folder

2. Command-line build with UAT (CI-friendly)

# Cook + build + stage + pak + archive a Shipping Windows build.
RunUAT BuildCookRun \
  -project="C:/Path/MyGame.uproject" \
  -noP4 -platform=Win64 -clientconfig=Shipping \
  -cook -allmaps -build -stage -pak -archive \
  -archivedirectory="C:/Builds/MyGame"

RunUAT lives in Engine/Build/BatchFiles/ (RunUAT.bat on Windows, RunUAT.sh on macOS/Linux). Drop -allmaps and pass -map=Map1+Map2 to cook a subset. UE 5.8 adds experimental Windows on Arm game builds: -clientarchitecture=arm64 (or arm64+x64 for both executables side by side); the editor itself is not supported on Arm64 in 5.8.

3. Cook only (no packaging), e.g. to refresh content

RunUAT BuildCookRun -project="C:/Path/MyGame.uproject" -noP4 \
  -platform=Win64 -clientconfig=Development -cook -skipstage

Pitfalls

  • Packaged build loads a black/empty level — Game Default Map isn't set (or that map wasn't cooked). Set it in Maps & Modes and ensure it's included in the cook.
  • Shipping a Development build — Development keeps logging/console/stats and is slower; ship Shipping. Conversely, Shipping strips UE_LOG/console, so debugging a Shipping-only issue needs Development or Test. A Shipping build has no console quit, so the game needs its own exit option.
  • A referenced map/asset is missing at runtime — it wasn't cooked. Add it to the Packaging settings' maps/directories to cook, or cook all maps.
  • Build fails on the platform — the platform SDK/toolchain isn't installed or is too old. For UE 5.8
常见问题

为什么打包后的游戏有时会显示黑屏?

该技能指出,项目设置中的默认起始地图是最常见的原因。

Development 和 Shipping 有什么区别?

Development 保留日志和测试工具,而 Shipping 会移除它们,用于正式发布。

它会把游戏发布到商店吗?

不会。商店发布步骤由另外的技能负责。

详情

作者的原始描述

Package and ship an Unreal Engine 5 project: the Platforms menu Package Project flow, build configurations (Development vs Shipping), cooking content, packaging settings and the Game Default Map, and command-line builds with RunUAT BuildCookRun. Use when packaging a build, making a shipping build, cooking content, configuring packaging settings, or when the user mentions package Unreal, cook content, shipping build, or BuildCookRun.

repo: gamedev-skills/awesome-gamedev-agent-skills

热度

GitHub 星标
6.6k
排名
#13857
许可证
Apache-2.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能