BuildGraph Usage

This page provides sample BuildGraph Script usage.

Windows
MacOS
Linux

BuildGraph is implemented as part of AutomationTool, which you can run directly from the Unreal Engine 4 solution on Windows, or via the Engine/Build/BatchFiles/RunUAT.bat batch file from the command line. On Mac or Linux, it can be run with the Engine/Build/BatchFiles/RunUAT.sh shell script. If you'd like to get an idea of how to use BuildGraph from the command line, we've written sample usage commands for your reference.

Showing Options & Nodes

To show all of the nodes and options available in a BuildGraph script:

BuildGraph -Script=Engine/Build/Graph/Examples/AllExamples -ListOnly

Setting an Option

To set an option defined in the script:

BuildGraph -Script=Engine/Build/Graph/Examples/Properties.xml -ListOnly -Set:CommandLineProperty=ABCDEF

Seeing Node Execution

To see what nodes will be executed for a target:

BuildGraph -Script=Engine\Build\Graph\Examples\AllExamples.xml -Target="All Examples" -ListOnly

Cleaning Previous Builds

To clean any previous builds and execute a specific target:

BuildGraph -Script=Engine\Build\Graph\Examples\AllExamples.xml -Target="Property Examples" -Clean

Writing out an XML Schema

To write out an XML schema containing all registered tasks:

BuildGraph -Schema=Engine\Build\Graph\Schema.xsd

Generating a Preprocessed Script

To output a preprocessed version of your script (useful for debugging):

BuildGraph -Script=Engine\Build\Graph\Examples\AllExamples.xml -Target="All Examples" -ListOnly -Preprocess=D:\Preprocessed.xml

Exporting a Preprocessed Graph to JSON

To export a preprocessed graph to JSON (for dynamic configuration on build systems):

BuildGraph -Script=Engine\Build\Graph\Examples\AllExamples.xml -Target="All Examples" -Export=D:\ExportedGraph.json

Executing a Single Node

To execute a single node on a build system (while transferring intermediates to and from shared storage):

BuildGraph -Script=Engine\Build\Graph\Examples\AllExamples.xml -Target="All Examples" -Clean -SingleNode="Manipulate Some Files" -SharedStorage=P:\Network-Share\Unique-Job-12345
Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback