Skip to content

Drive Unreal cook/package via UAT BuildCookRun - #51

Open
KevinTCoughlin wants to merge 1 commit into
mainfrom
unreal-cook-and-package
Open

Drive Unreal cook/package via UAT BuildCookRun#51
KevinTCoughlin wants to merge 1 commit into
mainfrom
unreal-cook-and-package

Conversation

@KevinTCoughlin

Copy link
Copy Markdown
Owner

Summary

Closes part of #47. The Unreal plugin's Deploy action 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.

  • Adds LazyDeckCookRunner, which invokes UAT's BuildCookRun asynchronously via IUATHelperModule for Linux/Win64 targets and Development/Shipping configs, mirroring the {ok, error} outcome shape BuildRunner.cs/export_runner.gd already use.
  • Wires a "Cook and Package" section into SLazyDeckDevicesPanel, ahead of the existing Deploy controls, reusing the same build-directory field.
  • Updates integrations/unreal/README.md and the root README.md to document the new flow, the platform-subfolder archive layout UAT produces, supported UE versions, and updated validation-status caveats.

Non-goals / follow-up

  • Not validated end-to-end against a real Unreal Engine toolchain. This was authored without an Unreal Engine install available to compile against (same constraint the rest of this plugin was written under — see the README's "Validation status"). 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.
  • Remote launch/stop remains out of scope (protocol-level limitation, docs/DEVICE_LAUNCH.md).

Test plan

  • just lint-unreal / the CI clang-format dry-run check passes on all changed/new files.
  • Compile LazyDeckEditor against a real UE 5.x C++ project and fix any API drift.
  • Run a real cook → package → deploy → launch cycle against a Steam Deck / Steam Machine.

🤖 Generated with Claude Code

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>
Copilot AI lite review requested due to automatic review settings August 24, 2026 15:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 FLazyDeckCookRunner to invoke UAT BuildCookRun asynchronously via IUATHelperModule.
  • 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"))
Comment on lines +489 to +494
if (OutputDirectory.IsEmpty())
{
AppendLog(TEXT("Fill in the build directory below (or Browse...) before cooking and packaging into it."));
return;
}

Comment on lines +44 to +48
if (OutputDirectory.IsEmpty() || FPaths::IsRelative(OutputDirectory))
{
OnComplete.ExecuteIfBound(FLazyDeckCookOutcome::Failure(TEXT("output directory must be an absolute path")));
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants