.NET Console Application for composing tasks for Unreal Engine (It can be used in other applications as well).
By default, the program lets you build your project in different configurations, build the engine from source, open levels without the editor, package your project or your plugins. This is similar to Unreal Binary Builder, but this program is a CLI so it could be easily hooked to a CI/CD environment, among other things. The default settings are somewhat opinionated (It's setup for Win64). The tasks can easily be modified, removed or extended by just modifying the .json file, and new C# scripts (for more complex behavior) can be created by implementing the program's interfaces.
- Either build the program using the recommended configuration or download the release files.
- Copy
utasks.exeandutasks.jsoncto the path of your Project (where .uproject lives) - Alternatively copy those files to the path of an Unreal Engine source folder (if you want to build the engine from source).
- You can then open
utasks.jsoncand make some changes to the settings according to your environment. - Open
utaks.exeand use the program.
The program already comes with variables and tasks defined. But you can easily extend/modify it.
See:
- https://github.com/cronofear-dev/utasks/blob/main/utasks.jsonc for Variables, Tasks and AutoTasks definitions
- https://github.com/cronofear-dev/utasks/blob/main/Types.cs for the Interfaces that can be implemented
- See the folders for each Interface for implementations examples
- Implementing the interfaces will automatically make them available and ready to be used in the
utasks.jsoncfile
// The Id is optional and can be used for composing `AutoTasks` of for calling this task from the CLI
"Id" : "BuildProject",
"Title" : "Build the Project (Multiple Configurations)",
"Subtasks" :
[
// Creates a subtask for building the project in (Win64 | DebugGame Editor) using `EditorTargetName` and `UProjectFilePath` single variables (`$` symbol)
{
"Msg" : "Build the Project (Win64 | DebugGame Editor)",
// The path of the program to run, can be `cmd` or other system programs as well
"Program" : "${Build_bat}",
"Args" : "${EditorTargetName} Win64 DebugGame ${UProjectFilePath} -waitmutex"
},
// Similarly creates a subtask for building the project in (Win64 | Development Editor)
{
"Msg" : "Build the Project (Win64 | Development Editor)",
"Program" : "${Build_bat}",
"Args" : "${EditorTargetName} Win64 Development ${UProjectFilePath} -waitmutex"
},
// Creates 3 subtasks for each variation of `TargetConfigurations`
// Note: Only the use of 1 variable list (`%` symbol) is supported atm
{
"Msg" : "Build the Project (Win64 | %{TargetConfigurations} Game)",
"Program" : "${Build_bat}",
"Args" : "${GameTargetName} Win64 %{TargetConfigurations} ${UProjectFilePath} -waitmutex"
}
],
// `FilterByInput` is a C# implementation of `ISubtasksFilters` that allows to choose 1 or more subtasks before running them
"SubtasksFilters" : [ "FilterByInput" ],
// `RunSubtasks` is a C# implementation of `IRunSubtasks` that runs the subtasks by default, in the order they were selected
"SubtasksAction" : "RunSubtasks"{
"Id" : "OpenLevel",
"Title" : "Open Level (No Editor)",
"Subtasks" :
[
// Creates n subtasks for each variation of `LevelReferences`
{
"Msg" : "Open Level (%{LevelReferences})",
"Program" : "${UnrealEditor_exe}",
"Args" : "${UProjectFilePath} %{LevelReferences} -game -log -nosteam -ResX=1920 -ResY=1080 -WinX=192 -WinY=108 -windowed"
}
],
// `FilterByInputSingleOption` is a C# implementation that allows to choose only 1 subtasks before running it
"SubtasksFilters" : [ "FilterByInputSingleOption" ],
"SubtasksAction" : "RunSubtasks"
},// For this particular task, the Subtasks are created by calling the C# script `GetPluginSubtasks`.
// `GetPluginSubtasks` is an implementation of `IGetSubtasks` that returns a `List<USubtask>` In this case a list of subtasks in the format:
// "Msg" : "${PluginName} (ParentFolderOfPlugin)",
// "Program" : "${RunUAT_bat}",
// "Args" : "BuildPlugin -Plugin=\"%{PluginName}\" -Package=\"${PluginsOutputPath}\\ParentFolderOfPlugin\" ${PluginPackageArgs}"
{
"Id" : "PackagePlugins",
"Title" : "Package Plugins (${PluginPackageArgs})",
"Subtasks" : "GetPluginSubtasks",
"SubtasksFilters" : ["FilterByInput"],
// `RunSubtasksForPlugins` is an implementation of `ISubtasksAction` for plugins that let us confirm the options we selected and shows the list of plugins to be packaged after all the filters have been applied
// It's essentially an `Are you sure you want to continue?` special action
"SubtasksAction" : "RunSubtasksForPlugins",
// `PackagePlugins` is an implementation of `TaskPostAction` that performs an operation on all successSubTasks and failedSubTasks
// For Plugins that failed to be packaged, removes the folder created for the packaging in `${PluginsOutputPath}\\ParentFolderOfPlugin`
// For Plugins that were packaged correctly, show more options (Zip Source Files, Zip Compiled Files, Deleting `${PluginsOutputPath}\\ParentFolderOfPlugin`)
"TaskPostAction" : "PackagePlugins"
},{
"Id" : "TestLevel1",
"Title" : "Test Level 1",
"StepsDescriptions" : ["Generate and Build the Project (Win64 | Development Editor)", "Open Level 1"],
// Start the task `GenerateAndBuildProject` and buffer the input `0`
// Then start the task `OpenLevel` and buffer the input `1`
// It's hard to see what it does by just watching this text, but by the way the program works this will:
// Build the project in `Development Editor` and then Open the first level in `LevelReferences`
// This may not be so useful in some scenearios, as the order of `LevelReferences` may change when creating/removing levels in the project
// This could be `solved` by manually adding some subtasks in the `OpenLevel` task, ensuring the important levels you want to test are always the first choices, for example
"Steps" : ["GenerateAndBuildProject 0", "OpenLevel 1"]
},By composing tasks or autotasks, it's possible to call these tasks in with program arguments in the CLI as well (By using the Id). This can be useful for using the program with a CI/CD application:
.\utasks.exe a=DefaultBuildEditor "," OpenLevel 1Will call theAutoTasknamedDefaultBuildEditor, then call theTasknamedOpenLeveland buffer the input1.\utasks.exe a=DefaultBuildEditor "," PackagePlugins 1 "<enter>" "1,2"Similar to the previous example,"<enter>"is a special input foremptyand"1,2"is an input that selects the choice1and2(Ranges are supported as well i.e."1,3-5")
The program has many hard edges as it's mostly developed solely for my personal use. It should work well as long as the variables and tasks are defined in a similar manner to the default ones. That being said, these are the limitations and knows issues that you may face:
- Multiple uses of the
%symbol are not supported both for creating and using the variables - A variable with multiple values (
%) can only be used to define multipleSubtasksatm. It may work if used in other parameters.

