Packaging¶
3 tools for packaged builds: starting, following and cancelling one.
Back to the index.
cancel_package_build¶
Destructive Idempotent
Stop the package build that start_package_build launched in this editor session, if it is still running: the whole process tree is killed (UAT and the UnrealBuildTool and cooker processes it spawned), so its partial output stays as it is and the build has to be started again from the beginning. A build launched outside this editor session is not seen. Idempotent: with no build running, or none started this session, nothing happens and canceled and was_running are false. canceled true means the kill was requested; the processes end asynchronously, so confirm with get_package_build_status (canceled true, running false) before starting a new build with start_package_build.
No parameters.
Returns: { canceled: bool, was_running: bool }
get_package_build_status¶
Read-only
Polls the state of the most recent start_package_build job: running / finished / canceled / launch-failed, with elapsed time and a tail of captured UAT output. Honest has_build:false if no build was ever started this editor session.
No parameters.
Returns: { has_build: bool, running?: bool, finished?: bool, canceled?: bool, launch_failed?: bool, exit_code?: int, success?: bool, platform?: string, configuration?: string, elapsed_seconds?: number, output_tail?: string }
start_package_build¶
Destructive
Starts an asynchronous project package build (BuildCookRun) via UAT (FSerializedUATProcess), for the current .uproject. Runs RunUAT BuildCookRun -project=<this project> -noP4 -utf8output -platform=<platform> -clientconfig=<configuration> -cook -allmaps -build -stage -pak -archive -archivedirectory=<dir>. This is a real external process that can take minutes (it builds the target, then cooks); the call returns immediately once launched -- poll get_package_build_status for progress/outcome. Refuses to start a second build while one is already in flight (honest, not silently queued).
| Parameter | Type | Required | Description |
|---|---|---|---|
platform |
string | no | Optional target platform (UAT platform name, e.g. "Win64"). Defaults to "Win64". |
configuration |
string | no | Optional build configuration ("Debug"|"DebugGame"|"Development"|"Test"|"Shipping"). Defaults to "Development". |
archive_directory |
string | no | Optional output directory for the archived build. Defaults to <ProjectSavedDir>/Packages/<platform>. |
extra_args |
string | no | Optional raw extra UAT arguments appended verbatim (e.g. "-distribution -iostore"). |
Returns: { build_started: bool, already_running: bool, platform: string, configuration: string, archive_directory: string, command_line: string, note: string }