Nuke.Unreal
Build Unreal apps in Style.
Loading...
Searching...
No Matches
Nuke.Unreal.UnrealBuild Class Referenceabstract

The main build class Unreal projects using Nuke.Unreal should inherit from. This class contains all base targets for use-cases which are relevant for 99% of Unreal project development tasks. More...

Inheritance diagram for Nuke.Unreal.UnrealBuild:
Nuke.Unreal.UnrealBuildTest

Public Member Functions

virtual AbsolutePath GetOutput ()
 Get an output folder where the targets should store their artifacts. Override this function in your main build class to enforce your own.
 
virtual UbtConfig UbtGlobal (UbtConfig _)
 UBT arguments to be applied globally for all UBT invocations. Override this function in your main build class if your project needs extra intricacies for everything what UBT may do through Nuke.Unreal.
 
virtual UatConfig UatGlobal (UatConfig _)
 UAT arguments to be applied globally for all UAT invocations. Override this function in your main build class if your project needs extra intricacies for everything what UAT may do through Nuke.Unreal.
 
EngineVersion GetEngineVersionFromProject ()
 Utility function to get the proper Engine version associated with current project. Rather use Unreal.Version static function, that looks nicer.
 
virtual void PrintInfo ()
 Print some rudimentary information onto console about this project and it's environment. Override this function in your main build class if your project may have its own important info like this useful for debugging.
 
virtual IEnumerable< string > GetArgumentBlock (string name="")
 Get optionally named argument block (section after -->) with contextual data substituted.

  • ~p Project file path
  • ~pdir Project folder
  • ~ue Unreal Engine folder

 
ConfigIni ReadIniHierarchy (string shortName, IniHierarchyLevel lowestLevel=IniHierarchyLevel.Base, IniHierarchyLevel highestLevel=IniHierarchyLevel.Saved, bool considerPlugins=true, IEnumerable< string >? extraConfigSubfolder=null)
 Read INI configuration emulating the same hierarchy of importance as Unreal Engine also does.
 
virtual UatConfig UatCook (UatConfig _)
 UAT arguments to be applied every time UAT is called for Cooking. Override this function in your main build class if your project needs extra intricacies for Cooking. For example specifying maps explicitly.
 
virtual bool ForDistribution ()
 Enforce packaging for distribution when that is set from Game ini files. Override this function in your main build class if you want a different logic set for flagging packages for distribution.
 

Public Attributes

AbsolutePath? Output
 
bool IgnoreGlobalArgs = false
 
string? Tool
 
string? Cmd
 

Protected Member Functions

Self< T > ()
 Shortcut to casting this to another class.
 
T? SelfAs< T > ()
 Shortcut to casting this to another class.
 
override void OnBuildInitialized ()
 

Properties

virtual ? string UnrealVersion [get, set]
 Most targets read the desired Unreal version from the project file.
 
virtual UnrealPlatform Platform = UnrealPlatform.FromFlag(Unreal.GetDefaultPlatform()) [get, set]
 
virtual UnrealConfig[] Config = [UnrealConfig.Development] [get, set]
 
virtual UnrealConfig[] EditorConfig = [UnrealConfig.Development] [get, set]
 
virtual UnrealTargetType[] TargetType = [UnrealTargetType.Game] [get, set]
 
AbsolutePath UnrealEnginePath [get]
 Path to the root of the associated Unreal Engine installation/source.
 
virtual AbsolutePath ProjectPath [get]
 
AbsolutePath ProjectFolder [get]
 Path to folder containing the .project file.
 
AbsolutePath PluginsFolder [get]
 
string ProjectName [get]
 Short name of the project.
 
ProjectDescriptor ProjectDescriptor [get, protected set]
 "Immutable" C# representation of the .uproject contents
 
virtual bool IsPerforce [get]
 Does this project reside in a Perforce workspace?
 
virtual Target Info [get]
 
virtual Target CleanDeployment [get]
 
virtual Target CleanProject [get]
 
virtual Target CleanPlugins [get]
 
virtual Target Clean [get]
 
virtual Target Switch [get]
 
virtual Target Prepare [get]
 
virtual Target Generate [get]
 
virtual Target BuildEditor [get]
 
virtual Target Build [get]
 
virtual Target Cook [get]
 
virtual Target EnsureBuildPluginSupport [get]
 
virtual Target RunUat [get]
 
virtual Target RunUbt [get]
 
virtual Target RunShell [get]
 
virtual Target Run [get]
 
virtual Target RunEditorCmd [get]
 
virtual AbsolutePath TemplatesPath = BoilerplateGenerator.DefaultTemplateFolder [get, set]
 
string[] Name = [] [get, set]
 
virtual string[] Spec = [] [get, set]
 
string? Suffix [get, set]
 
LibraryTypeLibraryType [get, set]
 
bool AddToTarget [get, set]
 
Target NewModule [get]
 
Target AddCode [get]
 
Target NewPlugin [get]
 
Target NewActor [get]
 
Target NewInterface [get]
 
Target NewObject [get]
 
Target NewStruct [get]
 
Target NewSpec [get]
 
Target UseLibrary [get]
 
Target UseXRepo [get]
 
Target UseCMake [get]
 
Target UseHeaderOnly [get]
 

Private Attributes

EngineVersion_engineVersionCache = null
 
AbsolutePath? _projectCache = null
 
ProjectDescriptor_projectDescriptor
 
bool? _isPerforceCache = null
 

Detailed Description

The main build class Unreal projects using Nuke.Unreal should inherit from. This class contains all base targets for use-cases which are relevant for 99% of Unreal project development tasks.

Definition at line 13 of file UnrealBuild.Templating.cs.

Member Function Documentation

◆ ForDistribution()

virtual bool Nuke.Unreal.UnrealBuild.ForDistribution ( )
virtual

Enforce packaging for distribution when that is set from Game ini files. Override this function in your main build class if you want a different logic set for flagging packages for distribution.

Definition at line 184 of file UnrealBuild.Targets.cs.

◆ GetArgumentBlock()

virtual IEnumerable< string > Nuke.Unreal.UnrealBuild.GetArgumentBlock ( string name = "")
virtual

Get optionally named argument block (section after -->) with contextual data substituted.

  • ~p Project file path
  • ~pdir Project folder
  • ~ue Unreal Engine folder

◆ GetEngineVersionFromProject()

EngineVersion Nuke.Unreal.UnrealBuild.GetEngineVersionFromProject ( )

Utility function to get the proper Engine version associated with current project. Rather use Unreal.Version static function, that looks nicer.

Definition at line 126 of file UnrealBuild.cs.

◆ GetOutput()

virtual AbsolutePath Nuke.Unreal.UnrealBuild.GetOutput ( )
virtual

Get an output folder where the targets should store their artifacts. Override this function in your main build class to enforce your own.

◆ OnBuildInitialized()

override void Nuke.Unreal.UnrealBuild.OnBuildInitialized ( )
protected

Definition at line 47 of file UnrealBuild.cs.

◆ PrintInfo()

virtual void Nuke.Unreal.UnrealBuild.PrintInfo ( )
virtual

Print some rudimentary information onto console about this project and it's environment. Override this function in your main build class if your project may have its own important info like this useful for debugging.

Definition at line 147 of file UnrealBuild.cs.

◆ ReadIniHierarchy()

ConfigIni Nuke.Unreal.UnrealBuild.ReadIniHierarchy ( string shortName,
IniHierarchyLevel lowestLevel = IniHierarchyLevel::Base,
IniHierarchyLevel highestLevel = IniHierarchyLevel::Saved,
bool considerPlugins = true,
IEnumerable< string >? extraConfigSubfolder = null )

Read INI configuration emulating the same hierarchy of importance as Unreal Engine also does.

Parameters
shortNameThe name of the configuration like Game or Engine
lowestLevelThe least important level of hierarchy for reading this config. Default is Base
highestLevelThe maximum important level of hierarchy for reading this config Default is Saved
considerPluginsIf true also consider config files found in plugins. Default if true.
extraConfigSubfolderManually add extra configuration subfolders which may be outside of the normal sources of config files.
Returns
The parsed contents of the indicated config name

Definition at line 197 of file UnrealBuild.cs.

◆ Self< T >()

T Nuke.Unreal.UnrealBuild.Self< T > ( )
protected

Shortcut to casting this to another class.

Type Constraints
T :INukeBuild 

◆ SelfAs< T >()

T? Nuke.Unreal.UnrealBuild.SelfAs< T > ( )
protected

Shortcut to casting this to another class.

Type Constraints
T :class 
T :INukeBuild 

◆ UatCook()

virtual UatConfig Nuke.Unreal.UnrealBuild.UatCook ( UatConfig _)
virtual

UAT arguments to be applied every time UAT is called for Cooking. Override this function in your main build class if your project needs extra intricacies for Cooking. For example specifying maps explicitly.

◆ UatGlobal()

virtual UatConfig Nuke.Unreal.UnrealBuild.UatGlobal ( UatConfig _)
virtual

UAT arguments to be applied globally for all UAT invocations. Override this function in your main build class if your project needs extra intricacies for everything what UAT may do through Nuke.Unreal.

Definition at line 110 of file UnrealBuild.cs.

◆ UbtGlobal()

virtual UbtConfig Nuke.Unreal.UnrealBuild.UbtGlobal ( UbtConfig _)
virtual

UBT arguments to be applied globally for all UBT invocations. Override this function in your main build class if your project needs extra intricacies for everything what UBT may do through Nuke.Unreal.

These arguments are also propagated to all UAT invocations through its -UbtArgs

Member Data Documentation

◆ _engineVersionCache

EngineVersion? Nuke.Unreal.UnrealBuild._engineVersionCache = null
private

Definition at line 120 of file UnrealBuild.cs.

◆ _isPerforceCache

bool? Nuke.Unreal.UnrealBuild._isPerforceCache = null
private

Definition at line 75 of file UnrealBuild.Project.cs.

◆ _projectCache

AbsolutePath? Nuke.Unreal.UnrealBuild._projectCache = null
private

Definition at line 15 of file UnrealBuild.Project.cs.

◆ _projectDescriptor

ProjectDescriptor? Nuke.Unreal.UnrealBuild._projectDescriptor
private

Definition at line 63 of file UnrealBuild.Project.cs.

◆ Cmd

string? Nuke.Unreal.UnrealBuild.Cmd

Definition at line 338 of file UnrealBuild.Targets.cs.

◆ IgnoreGlobalArgs

bool Nuke.Unreal.UnrealBuild.IgnoreGlobalArgs = false

Definition at line 259 of file UnrealBuild.Targets.cs.

◆ Output

AbsolutePath? Nuke.Unreal.UnrealBuild.Output

Definition at line 75 of file UnrealBuild.cs.

◆ Tool

string? Nuke.Unreal.UnrealBuild.Tool

Definition at line 312 of file UnrealBuild.Targets.cs.

Property Documentation

◆ AddCode

Target Nuke.Unreal.UnrealBuild.AddCode
get

Definition at line 132 of file UnrealBuild.Templating.cs.

◆ AddToTarget

bool Nuke.Unreal.UnrealBuild.AddToTarget
getset

Definition at line 108 of file UnrealBuild.Templating.cs.

◆ Build

virtual Target Nuke.Unreal.UnrealBuild.Build
get

Definition at line 151 of file UnrealBuild.Targets.cs.

◆ BuildEditor

virtual Target Nuke.Unreal.UnrealBuild.BuildEditor
get

Definition at line 118 of file UnrealBuild.Targets.cs.

◆ Clean

virtual Target Nuke.Unreal.UnrealBuild.Clean
get

Definition at line 63 of file UnrealBuild.Targets.cs.

◆ CleanDeployment

virtual Target Nuke.Unreal.UnrealBuild.CleanDeployment
get

Definition at line 28 of file UnrealBuild.Targets.cs.

◆ CleanPlugins

virtual Target Nuke.Unreal.UnrealBuild.CleanPlugins
get

Definition at line 36 of file UnrealBuild.Targets.cs.

◆ CleanProject

virtual Target Nuke.Unreal.UnrealBuild.CleanProject
get

Definition at line 32 of file UnrealBuild.Targets.cs.

◆ Config

virtual UnrealConfig [] Nuke.Unreal.UnrealBuild.Config = [UnrealConfig.Development]
getset

Definition at line 87 of file UnrealBuild.cs.

◆ Cook

virtual Target Nuke.Unreal.UnrealBuild.Cook
get

Definition at line 192 of file UnrealBuild.Targets.cs.

◆ EditorConfig

virtual UnrealConfig [] Nuke.Unreal.UnrealBuild.EditorConfig = [UnrealConfig.Development]
getset

Definition at line 90 of file UnrealBuild.cs.

◆ EnsureBuildPluginSupport

virtual Target Nuke.Unreal.UnrealBuild.EnsureBuildPluginSupport
get

Definition at line 230 of file UnrealBuild.Targets.cs.

◆ Generate

virtual Target Nuke.Unreal.UnrealBuild.Generate
get

Definition at line 94 of file UnrealBuild.Targets.cs.

◆ Info

virtual Target Nuke.Unreal.UnrealBuild.Info
get

Definition at line 24 of file UnrealBuild.Targets.cs.

◆ IsPerforce

virtual bool Nuke.Unreal.UnrealBuild.IsPerforce
get

Does this project reside in a Perforce workspace?

Definition at line 80 of file UnrealBuild.Project.cs.

◆ LibraryType

LibraryType? Nuke.Unreal.UnrealBuild.LibraryType
getset

Definition at line 105 of file UnrealBuild.Templating.cs.

◆ Name

string [] Nuke.Unreal.UnrealBuild.Name = []
getset

Definition at line 28 of file UnrealBuild.Templating.cs.

◆ NewActor

Target Nuke.Unreal.UnrealBuild.NewActor
get

Definition at line 157 of file UnrealBuild.Templating.cs.

◆ NewInterface

Target Nuke.Unreal.UnrealBuild.NewInterface
get

Definition at line 171 of file UnrealBuild.Templating.cs.

◆ NewModule

Target Nuke.Unreal.UnrealBuild.NewModule
get

Definition at line 110 of file UnrealBuild.Templating.cs.

◆ NewObject

Target Nuke.Unreal.UnrealBuild.NewObject
get

Definition at line 185 of file UnrealBuild.Templating.cs.

◆ NewPlugin

Target Nuke.Unreal.UnrealBuild.NewPlugin
get

Definition at line 143 of file UnrealBuild.Templating.cs.

◆ NewSpec

Target Nuke.Unreal.UnrealBuild.NewSpec
get

Definition at line 213 of file UnrealBuild.Templating.cs.

◆ NewStruct

Target Nuke.Unreal.UnrealBuild.NewStruct
get

Definition at line 199 of file UnrealBuild.Templating.cs.

◆ Platform

virtual UnrealPlatform Nuke.Unreal.UnrealBuild.Platform = UnrealPlatform.FromFlag(Unreal.GetDefaultPlatform())
getset

Definition at line 84 of file UnrealBuild.cs.

◆ PluginsFolder

AbsolutePath Nuke.Unreal.UnrealBuild.PluginsFolder
get

Definition at line 56 of file UnrealBuild.Project.cs.

◆ Prepare

virtual Target Nuke.Unreal.UnrealBuild.Prepare
get

Definition at line 83 of file UnrealBuild.Targets.cs.

◆ ProjectDescriptor

ProjectDescriptor Nuke.Unreal.UnrealBuild.ProjectDescriptor
getprotected set

"Immutable" C# representation of the .uproject contents

Definition at line 68 of file UnrealBuild.Project.cs.

◆ ProjectFolder

AbsolutePath Nuke.Unreal.UnrealBuild.ProjectFolder
get

Path to folder containing the .project file.

Definition at line 55 of file UnrealBuild.Project.cs.

◆ ProjectName

string Nuke.Unreal.UnrealBuild.ProjectName
get

Short name of the project.

Definition at line 61 of file UnrealBuild.Project.cs.

◆ ProjectPath

virtual AbsolutePath Nuke.Unreal.UnrealBuild.ProjectPath
get

Optionally specify a path to a .uproject file.

If not overridden Nuke.Unreal will traverse upwards on the directory tree, then sift through all subdirectories recursively (ignoring some known folders)

Definition at line 26 of file UnrealBuild.Project.cs.

◆ Run

virtual Target Nuke.Unreal.UnrealBuild.Run
get

Definition at line 314 of file UnrealBuild.Targets.cs.

◆ RunEditorCmd

virtual Target Nuke.Unreal.UnrealBuild.RunEditorCmd
get

Definition at line 340 of file UnrealBuild.Targets.cs.

◆ RunShell

virtual Target Nuke.Unreal.UnrealBuild.RunShell
get

Definition at line 281 of file UnrealBuild.Targets.cs.

◆ RunUat

virtual Target Nuke.Unreal.UnrealBuild.RunUat
get

Definition at line 261 of file UnrealBuild.Targets.cs.

◆ RunUbt

virtual Target Nuke.Unreal.UnrealBuild.RunUbt
get

Definition at line 271 of file UnrealBuild.Targets.cs.

◆ Spec

virtual string [] Nuke.Unreal.UnrealBuild.Spec = []
getset

Definition at line 72 of file UnrealBuild.Templating.cs.

◆ Suffix

string? Nuke.Unreal.UnrealBuild.Suffix
getset

Definition at line 85 of file UnrealBuild.Templating.cs.

◆ Switch

virtual Target Nuke.Unreal.UnrealBuild.Switch
get

Definition at line 68 of file UnrealBuild.Targets.cs.

◆ TargetType

virtual UnrealTargetType [] Nuke.Unreal.UnrealBuild.TargetType = [UnrealTargetType.Game]
getset

Definition at line 93 of file UnrealBuild.cs.

◆ TemplatesPath

virtual AbsolutePath Nuke.Unreal.UnrealBuild.TemplatesPath = BoilerplateGenerator.DefaultTemplateFolder
getset

Definition at line 25 of file UnrealBuild.Templating.cs.

◆ UnrealEnginePath

AbsolutePath Nuke.Unreal.UnrealBuild.UnrealEnginePath
get

Path to the root of the associated Unreal Engine installation/source.

Definition at line 140 of file UnrealBuild.cs.

◆ UnrealVersion

virtual ? string Nuke.Unreal.UnrealBuild.UnrealVersion
getset

Most targets read the desired Unreal version from the project file.

Definition at line 72 of file UnrealBuild.cs.

◆ UseCMake

Target Nuke.Unreal.UnrealBuild.UseCMake
get

Definition at line 314 of file UnrealBuild.Templating.cs.

◆ UseHeaderOnly

Target Nuke.Unreal.UnrealBuild.UseHeaderOnly
get

Definition at line 319 of file UnrealBuild.Templating.cs.

◆ UseLibrary

Target Nuke.Unreal.UnrealBuild.UseLibrary
get

Definition at line 227 of file UnrealBuild.Templating.cs.

◆ UseXRepo

Target Nuke.Unreal.UnrealBuild.UseXRepo
get

Definition at line 269 of file UnrealBuild.Templating.cs.


The documentation for this class was generated from the following files: