RunUAT BuildCookRun ignores StagingDirectory path settings of the project. How to stage properly?

I’m expecting RunUAT tool to stage project into path set in StagingDirectory setting of [/Script/UnrealEd.ProjectPackagingSettings].
But the ignores this setting and stores it into Saved/StagedBuilds.
How to set up staging directory properly?
The command:

BuildCookRun -project="...\TheGame.uproject" -platform=Win64 -config=Development -server -cook -stage -Target=TheGame+TheServer

Hi, I found your post accidentally when I had a similar issue. Maybe you’ve figured that out already but I’ll leave the answer here for anyone who may come here in the future.

The UAT seems to be always a little bit of mystery, perhaps because a small percentage of UE users ever gets to work with it. After digging in its code (for quite a while), I realized there are two kinds of directories to be aware of: Staging Directory and Archive Directory. You are probably looking to utilize the Archive Directory.

The Staging Directory you can set in the Project Settings seems to be (not 100% sure, please someone correct me if I’m wrong) the Archive Directory in fact, and in order to make it work, you need to add the -archive argument to the RunUAT script (the -stage arg should be kept as is).

If you want to change the Staging Directory, you need to add the -stagingdirectory=path parameter to the RunUAT script.

But what you are probably looking for is adding both -archive -archivedirectory=path manually to the RunUAT script.

There are a few examples you can check out at: GitHub - kasp1/dozer-pipelines: Publicly shared continuous deployment pipelines to be run by Dozer, a simple CI/CD runner.

1 Like