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

A collection of utilities around basic functions regarding the environment of the Engine we're working with. More...

Static Public Member Functions

static void WriteJson (object input, AbsolutePath path)
 Write data in JSON with Unreal conventions of JSON format.
 
static void InvalidateEnginePathCache ()
 In the rare and unlikely case that the Engine location may have changed during one session.
 
static AbsolutePath GetEnginePath (string engineAssociation, bool ignoreCache=false)
 Get the Unreal Engine path based on an input association text. (version, GUID or absolute path)
 
static EngineVersion Version (IUnrealBuild build)
 Get high-level version of currently used Engine.
 
static UnrealCompatibility AndLater (this UnrealCompatibility compatibility)
 Create a compatibility flag mask which indicates that a feature is available un-broken in given and the following versions of Unreal Engine.
 
static bool Is4 (IUnrealBuild build)
 Are we working with UE4.
 
static bool Is5 (IUnrealBuild build)
 Are we working with UE5.
 
static bool IsInstalled (AbsolutePath enginePath)
 Is given path a vanilla engine most probably installed via the Marketplace?
 
static bool IsInstalled (EngineVersion ofVersion)
 Are we working with a vanilla engine most probably installed via the Marketplace?
 
static bool IsInstalled (IUnrealBuild build)
 Are we working with a vanilla engine most probably installed via the Marketplace?
 
static bool IsSource (AbsolutePath enginePath)
 Is given path an engine built from source?
 
static bool IsSource (EngineVersion ofVersion)
 Are we working with an engine built from source?
 
static bool IsSource (IUnrealBuild build)
 Are we working with an engine built from source?
 
static AbsolutePath GetEnginePath (IUnrealBuild build)
 
static UnrealPlatformFlag GetHostPlatformFlag ()
 Get the current development platform flag Nuke.Unreal is ran on.
 
static UnrealPlatform GetHostPlatform ()
 Get the current development platform Nuke.Unreal is ran on.
 
static AbsolutePath MacRunMono (EngineVersion ofVersion)
 On Mac many Unreal tools need the Mono bootstrap.
 
static Action< IProcess > UnrealToolExitHandler (bool repeatErrorsOnFailure=false)
 Exit handler which throws an exception on error which doesn't include the entire process output, which tends to be biblical amount in case of Unreal.
 
static ToolEx BuildTool (EngineVersion ofVersion)
 Prepare invocation for UBT.
 
static ToolEx BuildTool (EngineVersion ofVersion, Action< UbtConfig > config)
 Prepare invocation for UBT with extra fluent-API configuration.
 
static ToolEx BuildTool (IUnrealBuild build)
 Prepare invocation for UBT.
 
static ToolEx BuildTool (IUnrealBuild build, Action< UbtConfig > config)
 Prepare invocation for UBT with extra fluent-API configuration.
 
static ToolEx AutomationTool (EngineVersion ofVersion)
 Prepare invocation for UAT.
 
static ToolEx AutomationTool (EngineVersion ofVersion, Action< UatConfig > config)
 Prepare invocation for UAT with extra fluent-API configuration.
 
static ToolEx AutomationTool (IUnrealBuild build)
 Prepare invocation for UAT.
 
static ToolEx AutomationTool (IUnrealBuild build, Action< UatConfig > config)
 Prepare invocation for UAT with extra fluent-API configuration.
 
static void ClearFolder (AbsolutePath folder)
 Clear intermediate folders of Unreal from a given folder.
 
static string ReadCopyrightFromProject (AbsolutePath projectFolder)
 Read copyright info from the project's DefaultGame.ini
 
static ToolEx GetTool (IUnrealBuild build, string name)
 Get a native binary tool from Engine/Binaries folder. Unreal tools written in C# or stored in other folders/sub-folders are not supported. You can omit the Unreal part of the tool name.
 

Static Public Attributes

static readonly? HashSet< AbsolutePath > EngineSearchPaths
 Frankly this is not really relevant anymore.
 
static ? AbsolutePath EnginePathCache = null
 Once the Engine location is found for the current session, it ain't gonna move around, so we cache it.
 
static readonly JsonSerializerSettings JsonReadSettings
 Common JsonSerializerSettings for Unreal conventions of JSON format.
 

Detailed Description

A collection of utilities around basic functions regarding the environment of the Engine we're working with.

Definition at line 23 of file Unreal.cs.

Constructor & Destructor Documentation

◆ Unreal()

static Nuke.Unreal.Unreal.Unreal ( )
staticprivate

Definition at line 36 of file Unreal.cs.

Member Function Documentation

◆ AndLater()

static UnrealCompatibility Nuke.Unreal.Unreal.AndLater ( this UnrealCompatibility compatibility)
static

Create a compatibility flag mask which indicates that a feature is available un-broken in given and the following versions of Unreal Engine.

◆ AutomationTool() [1/4]

static ToolEx Nuke.Unreal.Unreal.AutomationTool ( EngineVersion ofVersion)
static

Prepare invocation for UAT.

Returns
A Tool delegate for UAT

Definition at line 281 of file Unreal.cs.

◆ AutomationTool() [2/4]

static ToolEx Nuke.Unreal.Unreal.AutomationTool ( EngineVersion ofVersion,
Action< UatConfig > config )
static

Prepare invocation for UAT with extra fluent-API configuration.

Parameters
ofVersion
configAuto-generated Configuration facilities mirroring UAT arguments
Returns
A Tool delegate for UAT

Definition at line 300 of file Unreal.cs.

◆ AutomationTool() [3/4]

static ToolEx Nuke.Unreal.Unreal.AutomationTool ( IUnrealBuild build)
static

Prepare invocation for UAT.

Returns
A Tool delegate for UAT

◆ AutomationTool() [4/4]

static ToolEx Nuke.Unreal.Unreal.AutomationTool ( IUnrealBuild build,
Action< UatConfig > config )
static

Prepare invocation for UAT with extra fluent-API configuration.

Parameters
build
configAuto-generated Configuration facilities mirroring UAT arguments
Returns
A Tool delegate for UAT

◆ BuildTool() [1/4]

static ToolEx Nuke.Unreal.Unreal.BuildTool ( EngineVersion ofVersion)
static

Prepare invocation for UBT.

Returns
A Tool delegate for UBT

Definition at line 231 of file Unreal.cs.

◆ BuildTool() [2/4]

static ToolEx Nuke.Unreal.Unreal.BuildTool ( EngineVersion ofVersion,
Action< UbtConfig > config )
static

Prepare invocation for UBT with extra fluent-API configuration.

Parameters
ofVersion
configAuto-generated Configuration facilities mirroring UBT arguments
Returns
A Tool delegate for UBT

Definition at line 254 of file Unreal.cs.

◆ BuildTool() [3/4]

static ToolEx Nuke.Unreal.Unreal.BuildTool ( IUnrealBuild build)
static

Prepare invocation for UBT.

Returns
A Tool delegate for UBT

◆ BuildTool() [4/4]

static ToolEx Nuke.Unreal.Unreal.BuildTool ( IUnrealBuild build,
Action< UbtConfig > config )
static

Prepare invocation for UBT with extra fluent-API configuration.

Parameters
build
configAuto-generated Configuration facilities mirroring UBT arguments
Returns
A Tool delegate for UBT

◆ ClearFolder()

static void Nuke.Unreal.Unreal.ClearFolder ( AbsolutePath folder)
static

Clear intermediate folders of Unreal from a given folder.

Definition at line 328 of file Unreal.cs.

◆ GetEnginePath()

static AbsolutePath Nuke.Unreal.Unreal.GetEnginePath ( string engineAssociation,
bool ignoreCache = false )
static

Get the Unreal Engine path based on an input association text. (version, GUID or absolute path)

Definition at line 116 of file Unreal.cs.

◆ GetHostPlatform()

static UnrealPlatform Nuke.Unreal.Unreal.GetHostPlatform ( )
static

Get the current development platform Nuke.Unreal is ran on.

◆ GetHostPlatformFlag()

static UnrealPlatformFlag Nuke.Unreal.Unreal.GetHostPlatformFlag ( )
static

Get the current development platform flag Nuke.Unreal is ran on.

Definition at line 197 of file Unreal.cs.

◆ GetTool()

static ToolEx Nuke.Unreal.Unreal.GetTool ( IUnrealBuild build,
string name )
static

Get a native binary tool from Engine/Binaries folder. Unreal tools written in C# or stored in other folders/sub-folders are not supported. You can omit the Unreal part of the tool name.

Parameters
build
nameYou can omit the Unreal part of the tool name.
Returns
A Tool delegate for selected Unreal tool

Definition at line 362 of file Unreal.cs.

◆ InvalidateEnginePathCache()

static void Nuke.Unreal.Unreal.InvalidateEnginePathCache ( )
static

In the rare and unlikely case that the Engine location may have changed during one session.

◆ Is4()

static bool Nuke.Unreal.Unreal.Is4 ( IUnrealBuild build)
static

Are we working with UE4.

◆ Is5()

static bool Nuke.Unreal.Unreal.Is5 ( IUnrealBuild build)
static

Are we working with UE5.

◆ IsInstalled() [1/3]

static bool Nuke.Unreal.Unreal.IsInstalled ( AbsolutePath enginePath)
static

Is given path a vanilla engine most probably installed via the Marketplace?

◆ IsInstalled() [2/3]

static bool Nuke.Unreal.Unreal.IsInstalled ( EngineVersion ofVersion)
static

Are we working with a vanilla engine most probably installed via the Marketplace?

◆ IsInstalled() [3/3]

static bool Nuke.Unreal.Unreal.IsInstalled ( IUnrealBuild build)
static

Are we working with a vanilla engine most probably installed via the Marketplace?

◆ IsSource() [1/3]

static bool Nuke.Unreal.Unreal.IsSource ( AbsolutePath enginePath)
static

Is given path an engine built from source?

◆ IsSource() [2/3]

static bool Nuke.Unreal.Unreal.IsSource ( EngineVersion ofVersion)
static

Are we working with an engine built from source?

◆ IsSource() [3/3]

static bool Nuke.Unreal.Unreal.IsSource ( IUnrealBuild build)
static

Are we working with an engine built from source?

◆ MacRunMono()

static AbsolutePath Nuke.Unreal.Unreal.MacRunMono ( EngineVersion ofVersion)
static

On Mac many Unreal tools need the Mono bootstrap.

◆ ReadCopyrightFromProject()

static string Nuke.Unreal.Unreal.ReadCopyrightFromProject ( AbsolutePath projectFolder)
static

Read copyright info from the project's DefaultGame.ini

Definition at line 338 of file Unreal.cs.

◆ UnrealToolExitHandler()

static Action< IProcess > Nuke.Unreal.Unreal.UnrealToolExitHandler ( bool repeatErrorsOnFailure = false)
static

Exit handler which throws an exception on error which doesn't include the entire process output, which tends to be biblical amount in case of Unreal.

◆ Version()

static EngineVersion Nuke.Unreal.Unreal.Version ( IUnrealBuild build)
static

Get high-level version of currently used Engine.

◆ WriteJson()

static void Nuke.Unreal.Unreal.WriteJson ( object input,
AbsolutePath path )
static

Write data in JSON with Unreal conventions of JSON format.

Definition at line 82 of file Unreal.cs.

Member Data Documentation

◆ EnginePathCache

? AbsolutePath Nuke.Unreal.Unreal.EnginePathCache = null
static

Once the Engine location is found for the current session, it ain't gonna move around, so we cache it.

Definition at line 34 of file Unreal.cs.

◆ EngineSearchPaths

readonly? HashSet<AbsolutePath> Nuke.Unreal.Unreal.EngineSearchPaths
static

Frankly this is not really relevant anymore.

Definition at line 28 of file Unreal.cs.

◆ JsonReadSettings

readonly JsonSerializerSettings Nuke.Unreal.Unreal.JsonReadSettings
static
Initial value:
= new()
{
MissingMemberHandling = MissingMemberHandling.Ignore,
DefaultValueHandling = DefaultValueHandling.Populate,
NullValueHandling = NullValueHandling.Include,
Converters = {
new StringEnumConverter(false)
}
}

Common JsonSerializerSettings for Unreal conventions of JSON format.

Definition at line 69 of file Unreal.cs.


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