|
Nuke.Unreal
Build Unreal apps in Style.
|
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...
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.
| |
| 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 Member Functions inherited from Nuke.Unreal.IUnrealBuild | |
Public Attributes | |
| AbsolutePath? | Output |
| bool | IgnoreGlobalArgs = false |
| string? | Tool |
| string? | Cmd |
Protected Member Functions | |
| override void | OnBuildCreated () |
Properties | |
| virtual ? string | UnrealVersion [get, set] |
| virtual UnrealPlatform | Platform = UnrealPlatform.FromFlag(Unreal.GetHostPlatformFlag()) [get, set] |
| virtual UnrealConfig[] | Config = [UnrealConfig.Development] [get, set] |
| virtual UnrealConfig[] | EditorConfig = [UnrealConfig.Development] [get, set] |
| virtual UnrealTargetType[] | TargetType = [UnrealTargetType.Game] [get, set] |
| virtual AndroidCookFlavor[] | AndroidTextureMode = [ AndroidCookFlavor.Multi ] [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] |
| Path to the Unreal plugins folder of this project. | |
| string | ProjectName [get] |
| Short name of the project. | |
| ProjectDescriptor | ProjectDescriptor [get, protected set] |
"Immutable" C# representation of the .uproject contents | |
| virtual Target | HelpNukeUnreal [get] |
| 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 | SetupPlatformSdk [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] |
| LibraryType? | LibraryType [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] |
Properties inherited from Nuke.Unreal.IUnrealBuild | |
Private Attributes | |
| EngineVersion? | _engineVersionCache = null |
| AbsolutePath? | _projectCache = null |
| ProjectDescriptor? | _projectDescriptor |
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 10 of file UnrealBuild.Templating.cs.
|
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.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 368 of file UnrealBuild.Targets.cs.
|
virtual |
Get optionally named argument block (section after -->) with contextual data substituted.
~p Project file path ~pdir Project folder ~ue Unreal Engine folder Implements Nuke.Unreal.IUnrealBuild.
| 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.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 148 of file UnrealBuild.cs.
|
virtual |
Get an output folder where the targets should store their artifacts. Override this function in your main build class to enforce your own.
Implements Nuke.Unreal.IUnrealBuild.
|
protected |
Definition at line 37 of file UnrealBuild.cs.
|
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 169 of file UnrealBuild.cs.
| 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.
| shortName | The name of the configuration like Game or Engine |
| lowestLevel | The least important level of hierarchy for reading this config. Default is Base |
| highestLevel | The maximum important level of hierarchy for reading this config Default is Saved |
| considerPlugins | If true also consider config files found in plugins. Default if true. |
| extraConfigSubfolder | Manually add extra configuration subfolders which may be outside of the normal sources of config files. |
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 219 of file UnrealBuild.cs.
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.
Implements Nuke.Unreal.IUnrealBuild.
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.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 132 of file UnrealBuild.cs.
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
Implements Nuke.Unreal.IUnrealBuild.
|
private |
Definition at line 142 of file UnrealBuild.cs.
|
private |
Definition at line 15 of file UnrealBuild.Project.cs.
|
private |
Definition at line 63 of file UnrealBuild.Project.cs.
| string? Nuke.Unreal.UnrealBuild.Cmd |
NUKE PARAMETER
Name of the editor commandlet to run
Definition at line 681 of file UnrealBuild.Targets.cs.
| bool Nuke.Unreal.UnrealBuild.IgnoreGlobalArgs = false |
NUKE PARAMETER
Do not use globally applicable UBT/UAT arguments with run-uat/run-ubt
Definition at line 480 of file UnrealBuild.Targets.cs.
| AbsolutePath? Nuke.Unreal.UnrealBuild.Output |
NUKE PARAMETER
Specify the output working directory for artifacts
Definition at line 64 of file UnrealBuild.cs.
| string? Nuke.Unreal.UnrealBuild.Tool |
NUKE PARAMETER
Name the Unreal tool to be run, You can omit the Unreal prefix and the extension. For example:
Definition at line 612 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Add C++ code to a project which doesn't have one yet.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 162 of file UnrealBuild.Templating.cs.
|
getset |
NUKE PARAMETER
Explicitly add new module to project target
Definition at line 112 of file UnrealBuild.Templating.cs.
|
getset |
NUKE PARAMETER
Select texture compression mode for Android
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 115 of file UnrealBuild.cs.
|
get |
NUKE TARGET
Build this project for execution
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 323 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Build the editor binaries so this project can be opened properly in the Unreal editor
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 275 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Removes auto generated folders of Unreal Engine
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 144 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Removes previous deployment folder
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 73 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Removes auto generated folders of Unreal Engine from the plugins
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 105 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Removes auto generated folders of Unreal Engine from the project
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 89 of file UnrealBuild.Targets.cs.
|
getset |
NUKE PARAMETER
The target configuration for building or packaging the project
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 88 of file UnrealBuild.cs.
|
get |
NUKE TARGET
Cook Unreal assets for standalone game execution
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 389 of file UnrealBuild.Targets.cs.
|
getset |
NUKE PARAMETER
The editor configuration to be used while building or packaging the project
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 97 of file UnrealBuild.cs.
|
get |
NUKE TARGET
Ensure support for plain C# build plugins without the need for CSX or dotnet projects. This only needs to be done once, you can check the results into source control.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 445 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Generate project files for the default IDE of the current platform. You can specify further details with -->ubt argument block. It is equivalent to right clicking the uproject and selecting "Generate _IDE_
project files".
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 219 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Opens the Nuke.Unreal online documentation
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 34 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Prints curated information about project
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 57 of file UnrealBuild.Targets.cs.
|
getset |
NUKE PARAMETER
Specify the type of the third-party library being imported:
Header
header only C++ library which doesn't need extra preparation
CMake
generates an extra nuke target which prepares the CMake library to be used and distributed in Unreal.
XRepo
generates an extra nuke target which then installs the library on preparation via the xrepo package manager. The library for a specific platform will be available when running Prepare<library>, Prepare or Generate targets.
Definition at line 103 of file UnrealBuild.Templating.cs.
|
getset |
NUKE PARAMETER
Name parameter for boilerplate generators.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 30 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new Unreal Actor in current directory
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 225 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new Unreal Interface in current directory
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 258 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new module in the owning project or plugin (depending on working directory)
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 125 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new Unreal Object in current directory
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 291 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create a new project plugin.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 192 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new Unreal Automation Spec in current directory
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 357 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create new Unreal Struct in current directory
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 324 of file UnrealBuild.Templating.cs.
|
getset |
NUKE PARAMETER
Set platform for running targets
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 79 of file UnrealBuild.cs.
|
get |
Path to the Unreal plugins folder of this project.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 56 of file UnrealBuild.Project.cs.
|
get |
NUKE TARGET
Run necessary preparations which needs to be done before Unreal tools can handle the project. By default it is empty and the main build project may override it or other Targets can depend on it / hook into it.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 197 of file UnrealBuild.Targets.cs.
|
getprotected set |
"Immutable" C# representation of the .uproject contents
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 68 of file UnrealBuild.Project.cs.
|
get |
Path to folder containing the .project file.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 55 of file UnrealBuild.Project.cs.
|
get |
Short name of the project.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 61 of file UnrealBuild.Project.cs.
|
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)
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 26 of file UnrealBuild.Project.cs.
|
get |
NUKE TARGET
Run an Unreal tool from the engine binaries folder. You can omit the Unreal prefix and the extension. For example:
Working directory is the project folder, regardless of actual working directory.
The following symbols are replaced by Nuke.Unreal:
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 642 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Run an editor commandlet with arguments passed in after -->
The following symbols are replaced by Nuke.Unreal:
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 701 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Start a UShell session. This opens a new console window, and nuke will exit immadiately. Working directory is the project folder, regardless of actual working directory.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 579 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Simply run UAT with arguments passed after -->
The following symbols are replaced by Nuke.Unreal:
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 500 of file UnrealBuild.Targets.cs.
|
get |
NUKE TARGET
Simply run UBT with arguments passed after -->
The following symbols are replaced by Nuke.Unreal:
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 545 of file UnrealBuild.Targets.cs.
|
get |
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 246 of file UnrealBuild.Targets.cs.
|
getset |
NUKE PARAMETER
Specification(s) of the imported library(ies). This is used slightly differently based on which library type is being used:
Header / CMake: It's only the name of the library (like \--Spec spdlog)
XRepo: specify the xrepo package reference and its config separated by space. For example:
Or multiple libraries at once
More about xrepo: https://xrepo.xmake.io
Since Unreal uses MD runtime linkage ‘runtimes='MD’` config is always appended by Nuke.Unreal, and the user must not specify it.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 67 of file UnrealBuild.Templating.cs.
|
getset |
NUKE PARAMETER
Some boilerplate generators allows to define an extra suffix for names depending on their use case. For example NewLibrary can use the plain Name for library folder structure and Name_MySuffix for module names (when Suffix is set to MySuffix)
Definition at line 78 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Switch to an explicit Engine versionű
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 164 of file UnrealBuild.Targets.cs.
|
getset |
NUKE PARAMETER
The Unreal target type for building the project
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 106 of file UnrealBuild.cs.
|
getset |
NUKE PARAMETER
Specify a folder containing generator specific folders for Scriban scaffolding and templates. If left empty the templates coming with Nuke.Unreal will be used.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 21 of file UnrealBuild.Templating.cs.
|
get |
Path to the root of the associated Unreal Engine installation/source.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 162 of file UnrealBuild.cs.
|
getset |
NUKE PARAMETER
Specify the target Unreal Engine version. It's used only for the Switch target. Everything else should infer engine version from the project file. Can be simple version name like 5.5, a GUID associated with engine location or an absolute path to engine root.
Most targets read the desired Unreal version from the project file.
Definition at line 55 of file UnrealBuild.cs.
|
get |
NUKE TARGET
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 532 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 542 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Create boilerplate module for third-party C++ libraries. Specify the kind of library with \--LibraryType Header|CMake|XRepo The latter two will generate extra nuke targets preparing the library to be consumed by Unreal. Fetching/storing the library is up to the developer (except of course with XRepo).
Use type specific targets for more comfortable CLI experience, for example
nuke use-xrepo \--Spec tracy
instead of
nuke UseLibrary --LibraryType xrepo --Spec tracy
This only needs to be done once, you can check the results into source control.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 406 of file UnrealBuild.Templating.cs.
|
get |
NUKE TARGET
Use libraries from the xrepo package manager. This target only configures another target which will eventually fetch the input libraries. To make them available to Unreal run Prepare or Generate targets.
Specify the xrepo package reference and its config separated by space. For example:
Or multiple libraries at once
More about xrepo: https://xrepo.xmake.io
Since Unreal uses MD runtime linkage ‘runtimes='MD’` config is always appended by Nuke.Unreal, and the user must not specify it.
Implements Nuke.Unreal.IUnrealBuild.
Definition at line 488 of file UnrealBuild.Templating.cs.