Files
UnrealEngineUWP/Engine/Documentation/Source/Programming/Development/BuildGraph/ScriptAnatomy/Tasks/BuildGraphScriptTasks.INT.udn
Robert Gervais 3de13fdb49 #jira UEDOC-3211
Fixing broken links and removing introduction page per JeffW.

#UE4doc

[CL 3090650 by Robert Gervais in Main branch]
2016-08-16 12:54:34 -04:00

58 lines
2.7 KiB
Plaintext

Availability: Docs
Title: BuildGraph Script Tasks
Crumbs: %ROOT%, Programming, Programming/Development, Programming/Development/BuildGraph, Programming/Development/BuildGraph/ScriptAnatomy
Description: Learn how BuildGraph can help you create custom tasks.
version: 4.13
parent:Programming/Development/BuildGraph
type:Reference
related: Programming/Development/BuildGraph/ScriptAnatomy
tags:BuildGraph
[VAR:TopicCompact]
[OBJECT:TopicCompact]
[PARAM:image]
![%Programming/Development/BuildGraph/ScriptAnatomy/Tasks%](tasks_topic.png)
[/PARAM]
[PARAM:icon]
![](%ROOT%/reference_icon.png)(convert:false)
[/PARAM]
[PARAM:title]
%Programming/Development/BuildGraph/ScriptAnatomy/Tasks:title%
[/PARAM]
[PARAM:description]
%Programming/Development/BuildGraph/ScriptAnatomy/Tasks:description%
[/PARAM]
[PARAM:path]
[RELATIVE:Programming/Development/BuildGraph/ScriptAnatomy/Tasks]
[/PARAM]
[/OBJECT]
[/VAR]
[TOC(start:1 end:3)]
[EXCERPT:BuildGraphScriptTasks]
Typically, project-specific utility scripts are implemented as AutomationTool BuildCommand classes. There are times; however, when you'll want
to automate custom tasks for your project. This is where BuildGraph can help. BuildGraph can be extended with any number of tasks, enabling you
to customize your build automation tasks in ways that suit your specific needs. The following section goes over ways of creating custom
tasks using BuildGraph, including a listing of predefined tasks that'll give you a great starting point for creating custom tasks.
## Custom Tasks
To create a new custom task, implement a class derived from the `CustomTask` class and apply the `[TaskElement]` attribute to it.
The `TaskElement` constructor takes two arguments; the name of the XML element that it's represented by, and the type of class
containing its parameters (which is passed to the constructor at load time).
If you want to read parameter class fields from an XML file, attach the `[TaskParameter]` attribute to the task. Attaching the
`TaskParameter` attribute indicates if the parameter is required or optional, including additional validation that should be
applied to the argument.
## Predefined Tasks
If you'd like to have a starting point for creating tasks, we're providing a variety of predefined tasks as templates for you to work from.
If you're looking for a simple predefined task to start from, we recommend using `LogTask` as a good starting point. If you want to keep up with
our latest improvements to BuildGraph; bookmark this page, because the following list of predefined tasks will be updated periodically.
[INCLUDE:Programming/Development/BuildGraph/ScriptAnatomy/Tasks/PredefinedTasks]
[/EXCERPT:BuildGraphScriptTasks]