Drive Unreal cook/package via UAT BuildCookRun - #51
Conversation
The Unreal plugin's Deploy action previously assumed a build already existed and only pushed an already-staged directory, unlike the Unity and Godot integrations which drive their own build/export step. Adds LazyDeckCookRunner, which invokes UAT's BuildCookRun asynchronously via IUATHelperModule for Linux/Win64 targets, and wires a "Cook and Package" action into the devices panel ahead of Deploy. Documents the new flow, its platform-subfolder archive layout, and that end-to-end validation against a real UE 5.x toolchain is still needed (this was authored without an Unreal Engine install to compile against). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new UAT invocation path needs small but important hardening (argument-quoting safety and consistent absolute-path validation) plus a UI label fix before it’s safe to merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the Unreal Engine integration so the editor plugin can drive Unreal’s own cook/package pipeline (UAT BuildCookRun) from within the LazyDeck dock, bringing it closer to feature-parity with the Unity and Godot integrations.
Changes:
- Adds
FLazyDeckCookRunnerto invoke UATBuildCookRunasynchronously viaIUATHelperModule. - Wires new “Cook and package” controls into
SLazyDeckDevicesPanel, reusing the existing build-directory field as the archive output location. - Updates Unreal and root documentation to describe the new cook/package flow, output layout, and validation caveats.
File summaries
| File | Description |
|---|---|
README.md |
Updates the Unreal integration description to include cook/package support and caveats. |
integrations/unreal/README.md |
Documents the new BuildCookRun-based cook/package flow and output layout. |
integrations/unreal/LazyDeck/Source/LazyDeckEditor/Public/SLazyDeckDevicesPanel.h |
Adds cook/package UI state + callbacks and integrates cook runner in the panel. |
integrations/unreal/LazyDeck/Source/LazyDeckEditor/Public/LazyDeckCookRunner.h |
Introduces cook/package outcome + runner API for invoking UAT asynchronously. |
integrations/unreal/LazyDeck/Source/LazyDeckEditor/Private/SLazyDeckDevicesPanel.cpp |
Implements the new cook/package UI controls and completion logging. |
integrations/unreal/LazyDeck/Source/LazyDeckEditor/Private/LazyDeckCookRunner.cpp |
Implements BuildCookRun command line construction + UAT task invocation. |
integrations/unreal/LazyDeck/Source/LazyDeckEditor/LazyDeckEditor.Build.cs |
Adds the UATHelper dependency needed to run UAT tasks. |
Review details
Suppressed comments (1)
integrations/unreal/LazyDeck/Source/LazyDeckEditor/Private/LazyDeckCookRunner.cpp:55
- BuildCookRun command line includes ProjectPath in a quoted argument. While rare, a project path containing quotes/newlines would break quoting and could inject unintended UAT flags. Add a defensive validation similar to OutputDirectory.
if (ProjectPath.IsEmpty())
{
OnComplete.ExecuteIfBound(FLazyDeckCookOutcome::Failure(TEXT("no project is currently open")));
return;
}
- Files reviewed: 7/7 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| [SAssignNew(CookDevelopmentCheckBox, SCheckBox).Content()[SNew(STextBlock).Text(LOCTEXT("CookDevelopment", "Development config"))]] + | ||
| SHorizontalBox::Slot().AutoWidth().Padding(8, 0, 0, | ||
| 0)[SNew(SButton) | ||
| .Text(LOCTEXT("CookAndPackage", "Cook && Package")) |
| if (OutputDirectory.IsEmpty()) | ||
| { | ||
| AppendLog(TEXT("Fill in the build directory below (or Browse...) before cooking and packaging into it.")); | ||
| return; | ||
| } | ||
|
|
| if (OutputDirectory.IsEmpty() || FPaths::IsRelative(OutputDirectory)) | ||
| { | ||
| OnComplete.ExecuteIfBound(FLazyDeckCookOutcome::Failure(TEXT("output directory must be an absolute path"))); | ||
| return; | ||
| } |
Summary
Closes part of #47. The Unreal plugin's
Deployaction previously assumed a build already existed and only pushed an already-staged directory — unlike the Unity (BuildPipeline.BuildPlayer) and Godot (godot --headless --export-*) integrations, which drive their own build/export step.LazyDeckCookRunner, which invokes UAT'sBuildCookRunasynchronously viaIUATHelperModulefor Linux/Win64 targets and Development/Shipping configs, mirroring the{ok, error}outcome shapeBuildRunner.cs/export_runner.gdalready use.SLazyDeckDevicesPanel, ahead of the existing Deploy controls, reusing the same build-directory field.integrations/unreal/README.mdand the rootREADME.mdto document the new flow, the platform-subfolder archive layout UAT produces, supported UE versions, and updated validation-status caveats.Non-goals / follow-up
IUATHelperModule::CreateUatTask's signature has shifted across 5.x releases; this targets the UE 5.3–5.4 shape and may need adjustment on other versions.docs/DEVICE_LAUNCH.md).Test plan
just lint-unreal/ the CI clang-format dry-run check passes on all changed/new files.LazyDeckEditoragainst a real UE 5.x C++ project and fix any API drift.🤖 Generated with Claude Code