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

A class encapsulating information and tasks around one Unreal plugin. More...

Public Member Functions

void AddExplicitPluginFiles (IEnumerable< AbsolutePath > files)
 Add explicit plugin files to be listed later in FilterPlugin.ini.
 
void AddExplicitPluginFiles (IEnumerable< RelativePath > pluginRelativePaths)
 Add explicit plugin files to be listed later in FilterPlugin.ini.
 
AbsolutePath GetDistributionOutput (UnrealBuild build, PluginDistributionOptions? options=null)
 Gets the output folder for distribution.
 
AbsolutePath GetBuildOutput (UnrealBuild build, PluginBuildOptions? options=null)
 Gets the output folder for packaging this plugin.
 
void GenerateFilterPluginIni (UnrealBuild build)
 Generate the FilterPlugin.ini file after all components have submitted their explicit files.
 
IEnumerable< ImportedItem > AbsolutePath output DistributeSource (UnrealBuild build, PluginDistributionOptions? options=null, bool pretend=false)
 
AbsolutePath BuildPlugin (UnrealBuild build, Func< UatConfig, UatConfig >? uatConfig=null, Func< UbtConfig, UbtConfig >? ubtConfig=null, PluginBuildOptions? buildOptions=null, PluginDistributionOptions? distOptions=null, Func< UnrealPlugin, PluginBuildArguments, PluginBuildArguments?>? dependencyHandler=null)
 Make a prebuilt release of this plugin for end-users. Globally set UAT and UBT arguments are used from the input UnrealBuild.
 

Static Public Member Functions

static UnrealPlugin Get (AbsolutePath from)
 

Public Attributes

IEnumerable< ImportedItem > result
 Create a copy of this plugin which can be distributed to other developers or other tools who shouldn't require extra non-unreal related steps to work with it.
 

Static Public Attributes

static readonly Dictionary< AbsolutePath, UnrealPluginInstances = []
 

Package Functions

 UnrealPlugin (AbsolutePath uplugin)
 

Static Package Functions

static string RelativePathDistinction< T > (T path)
 

Properties

AbsolutePath PluginPath [get, private set]
 Path to the .uplugin file.
 
PluginDescriptor Descriptor [get, private set]
 "Immutable" C# representation of the uplugin file
 
AbsolutePath Folder [get]
 Path to folder containing the .uplugin file.
 
AbsolutePath ConfigFolder [get]
 
AbsolutePath FilterPluginIni [get]
 
string Name [get]
 Short name of the plugin.
 
Version Version [get, set]
 Semantic version of the plugin. Parsed from the uplugin file. If set, it will modify the .uplugin file as well.
 
IEnumerable< AbsolutePath > ExplicitPluginFiles [get]
 Return list of files which may need extra mention for Unreal/Epic tools. This is also usually the contents of FilterPlugin.ini.
 
RelativePath _defaultDistSubdir [get]
 
RelativePath _defaultBuildSubdir [get]
 

Private Member Functions

IEnumerable< AbsolutePath > GetDefaultExplicitPluginFiles (UnrealBuild build)
 
void AddDefaultExplicitPluginFiles (UnrealBuild build)
 
bool InjectBinaryPlumbing (PluginDescriptor descriptor, out PluginDescriptor result)
 
IEnumerable< UnrealPluginGetProjectPluginDependencies (UnrealBuild build)
 Get the project plugin dependencies of this plugin as UnrealPlugin objects.
 

Private Attributes

Version_versionCache = null
 
List< UnixRelativePath > _explicitPluginFiles = []
 
PluginDistributionOptions _distributionOptionsCache = new()
 
PluginBuildOptions _buildOptionsCache = new()
 
AbsolutePath? _buildOutput = null
 

Static Private Attributes

static readonly ExportManifest _filterExportManifest
 

Detailed Description

A class encapsulating information and tasks around one Unreal plugin.

Definition at line 119 of file UnrealPlugin.cs.

Constructor & Destructor Documentation

◆ UnrealPlugin()

Nuke.Unreal.Plugins.UnrealPlugin.UnrealPlugin ( AbsolutePath uplugin)
package

Definition at line 156 of file UnrealPlugin.cs.

Member Function Documentation

◆ AddExplicitPluginFiles() [1/2]

void Nuke.Unreal.Plugins.UnrealPlugin.AddExplicitPluginFiles ( IEnumerable< AbsolutePath > files)

Add explicit plugin files to be listed later in FilterPlugin.ini.

Parameters
filesAbsolute paths to the files. Relative paths will be calculated based on plugin root.

◆ AddExplicitPluginFiles() [2/2]

void Nuke.Unreal.Plugins.UnrealPlugin.AddExplicitPluginFiles ( IEnumerable< RelativePath > pluginRelativePaths)

Add explicit plugin files to be listed later in FilterPlugin.ini.

◆ BuildPlugin()

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.BuildPlugin ( UnrealBuild build,
Func< UatConfig, UatConfig >? uatConfig = null,
Func< UbtConfig, UbtConfig >? ubtConfig = null,
PluginBuildOptions? buildOptions = null,
PluginDistributionOptions? distOptions = null,
Func< UnrealPlugin, PluginBuildArguments, PluginBuildArguments?>? dependencyHandler = null )

Make a prebuilt release of this plugin for end-users. Globally set UAT and UBT arguments are used from the input UnrealBuild.

Parameters
build
uatConfigConfigurator for UAT
ubtConfigConfigurator for UBT (only when UBT method is used)
buildOptionsOptional arguments for packaging
distOptionsOptional arguments for distribution
dependencyHandlerCustomize the build option for plugin dependencies
Returns
Output folder of the packaged plugin

Definition at line 497 of file UnrealPlugin.cs.

◆ DistributeSource()

IEnumerable< ImportedItem > AbsolutePath output Nuke.Unreal.Plugins.UnrealPlugin.DistributeSource ( UnrealBuild build,
PluginDistributionOptions? options = null,
bool pretend = false )

Definition at line 408 of file UnrealPlugin.cs.

◆ GenerateFilterPluginIni()

void Nuke.Unreal.Plugins.UnrealPlugin.GenerateFilterPluginIni ( UnrealBuild build)

Generate the FilterPlugin.ini file after all components have submitted their explicit files.

Definition at line 292 of file UnrealPlugin.cs.

◆ Get()

static UnrealPlugin Nuke.Unreal.Plugins.UnrealPlugin.Get ( AbsolutePath from)
static

Get a PluginInfo instance from the path to its .uplugin file, or a file/folder belonging to that plugin (in its subtree of files and folders). If a PluginInfo doesn't exist yet, one will be created given that the associated plugin exists.

For example:

// In a local <tt>MyPlugin.nuke.cs</tt>
PluginInfo.Get(this.ScriptFolder()); // Gets or creates a <tt>PluginInfo</tt> about <tt>MyPlugin.uplugin</tt>

Referring to non-existing plugins is a runtime error.

Parameters
from
Returns

Definition at line 144 of file UnrealPlugin.cs.

◆ GetBuildOutput()

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.GetBuildOutput ( UnrealBuild build,
PluginBuildOptions? options = null )

Gets the output folder for packaging this plugin.

Parameters
build
optionsOptional argument to get the output from. If another functionality has cached this before, this is not needed.

Definition at line 279 of file UnrealPlugin.cs.

◆ GetDistributionOutput()

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.GetDistributionOutput ( UnrealBuild build,
PluginDistributionOptions? options = null )

Gets the output folder for distribution.

Parameters
build
optionsOptional argument to get the output from. If another functionality has cached this before, this is not needed.

Definition at line 259 of file UnrealPlugin.cs.

◆ GetProjectPluginDependencies()

IEnumerable< UnrealPlugin > Nuke.Unreal.Plugins.UnrealPlugin.GetProjectPluginDependencies ( UnrealBuild build)
private

Get the project plugin dependencies of this plugin as UnrealPlugin objects.

Parameters
build
Returns

◆ InjectBinaryPlumbing()

bool Nuke.Unreal.Plugins.UnrealPlugin.InjectBinaryPlumbing ( PluginDescriptor descriptor,
out PluginDescriptor result )
private

Definition at line 338 of file UnrealPlugin.cs.

Member Data Documentation

◆ _buildOptionsCache

PluginBuildOptions Nuke.Unreal.Plugins.UnrealPlugin._buildOptionsCache = new()
private

Definition at line 268 of file UnrealPlugin.cs.

◆ _buildOutput

AbsolutePath? Nuke.Unreal.Plugins.UnrealPlugin._buildOutput = null
private

Definition at line 484 of file UnrealPlugin.cs.

◆ _distributionOptionsCache

PluginDistributionOptions Nuke.Unreal.Plugins.UnrealPlugin._distributionOptionsCache = new()
private

Definition at line 248 of file UnrealPlugin.cs.

◆ _explicitPluginFiles

List<UnixRelativePath> Nuke.Unreal.Plugins.UnrealPlugin._explicitPluginFiles = []
private

Definition at line 218 of file UnrealPlugin.cs.

◆ _filterExportManifest

readonly ExportManifest Nuke.Unreal.Plugins.UnrealPlugin._filterExportManifest
staticprivate
Initial value:
= new()
{
Copy = { new() { File = "Config/**/*.ini" , Not = {"FilterPlugin.ini"}} },
Not = {
"PluginFiles.yml",
"*.nuke.cs",
"*.nuke.csx",
"Nuke.Targets",
".Nuke",
".git",
".gitignore",
".p4ignore",
},
Use = {
new() { File = "**/PluginFiles.yml" }
}
}

Definition at line 309 of file UnrealPlugin.cs.

◆ _versionCache

Version? Nuke.Unreal.Plugins.UnrealPlugin._versionCache = null
private

Definition at line 197 of file UnrealPlugin.cs.

◆ Instances

readonly Dictionary<AbsolutePath, UnrealPlugin> Nuke.Unreal.Plugins.UnrealPlugin.Instances = []
static

Definition at line 121 of file UnrealPlugin.cs.

◆ result

IEnumerable<ImportedItem> Nuke.Unreal.Plugins.UnrealPlugin.result

Create a copy of this plugin which can be distributed to other developers or other tools who shouldn't require extra non-unreal related steps to work with it.

Parameters
build
optionsOptional arguments for distribution
pretendDo not have side effects on files, just return a list of files which may be affected by this operation.
Returns
  • result: List of files which has been copied
  • output: Output folder of distribution

Definition at line 408 of file UnrealPlugin.cs.

Property Documentation

◆ _defaultBuildSubdir

RelativePath Nuke.Unreal.Plugins.UnrealPlugin._defaultBuildSubdir
getprivate

Definition at line 269 of file UnrealPlugin.cs.

◆ _defaultDistSubdir

RelativePath Nuke.Unreal.Plugins.UnrealPlugin._defaultDistSubdir
getprivate

Definition at line 249 of file UnrealPlugin.cs.

◆ ConfigFolder

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.ConfigFolder
get

Definition at line 189 of file UnrealPlugin.cs.

◆ Descriptor

PluginDescriptor Nuke.Unreal.Plugins.UnrealPlugin.Descriptor
getprivate set

"Immutable" C# representation of the uplugin file

Definition at line 182 of file UnrealPlugin.cs.

◆ ExplicitPluginFiles

IEnumerable<AbsolutePath> Nuke.Unreal.Plugins.UnrealPlugin.ExplicitPluginFiles
get

Return list of files which may need extra mention for Unreal/Epic tools. This is also usually the contents of FilterPlugin.ini.

Definition at line 224 of file UnrealPlugin.cs.

◆ FilterPluginIni

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.FilterPluginIni
get

Definition at line 190 of file UnrealPlugin.cs.

◆ Folder

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.Folder
get

Path to folder containing the .uplugin file.

Definition at line 187 of file UnrealPlugin.cs.

◆ Name

string Nuke.Unreal.Plugins.UnrealPlugin.Name
get

Short name of the plugin.

Definition at line 195 of file UnrealPlugin.cs.

◆ PluginPath

AbsolutePath Nuke.Unreal.Plugins.UnrealPlugin.PluginPath
getprivate set

Path to the .uplugin file.

Definition at line 177 of file UnrealPlugin.cs.

◆ Version

Version Nuke.Unreal.Plugins.UnrealPlugin.Version
getset

Semantic version of the plugin. Parsed from the uplugin file. If set, it will modify the .uplugin file as well.

Definition at line 203 of file UnrealPlugin.cs.


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