2023-06-15 15:04:15 +01:00
|
|
|
# Building Plugins
|
|
|
|
|
|
|
|
If you want to build a plugin so that you can test it locally as if it was a
|
|
|
|
Marketplace plugin (before you [package it](PluginPackage.md)), the
|
|
|
|
`ue-build-plugin.ps1` script can help make it easier.
|
|
|
|
|
|
|
|
The plugin will be built for the current platform only, using the engine version
|
|
|
|
specified in the .uplugin file.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
Usage:
|
|
|
|
ue-build-plugin.ps1 [[-src:]sourcefolder] [Options]
|
|
|
|
|
2023-06-29 11:42:46 +01:00
|
|
|
-src : Source folder (current folder if omitted)
|
|
|
|
: (should be root of project)
|
|
|
|
-allplatforms : Build for all platforms, not just the current one
|
2023-06-29 14:40:36 +01:00
|
|
|
-allversions : Build for all supported UE versions, not just the current one"
|
|
|
|
: (specified in pluginconfig.json, only works with lancher-installed UE)"
|
|
|
|
-uever:5.x.x : Build for a specific UE version, not the current one (launcher only)"
|
2023-06-29 11:42:46 +01:00
|
|
|
-dryrun : Don't perform any actual actions, just report on what you would do
|
|
|
|
-help : Print this help
|
2023-06-15 15:04:15 +01:00
|
|
|
|
|
|
|
Environment Variables:
|
|
|
|
UEINSTALL : Use a specific Unreal install.
|
|
|
|
: Default is to find one based on project version, under UEROOT
|
|
|
|
UEROOT : Parent folder of all binary Unreal installs (detects version).
|
|
|
|
: Default C:\Program Files\Epic Games
|
|
|
|
```
|
|
|
|
|
|
|
|
This script operates based on a `pluginconfig.json` file which must be present
|
|
|
|
in the root of your plugin, next to the .uplugin file. The options are:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"PackageDir": "C:\\Users\\Steve\\Marketplace",
|
|
|
|
"BuildDir": "C:\\Users\\Steve\\Builds\\MyPlugin",
|
|
|
|
"PluginFile": "OptionalPluginFilenameWillDetectInDirOtherwise.uplugin",
|
2023-06-29 14:40:36 +01:00
|
|
|
|
|
|
|
"EngineVersions":
|
|
|
|
[
|
|
|
|
"5.1.0",
|
|
|
|
"5.2.0"
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2023-06-15 15:04:15 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-06-29 14:40:36 +01:00
|
|
|
Only `BuildDir` is required.
|
|
|
|
|
|
|
|
The `-allversions` option only works with Launcher installed engines,
|
|
|
|
since the path is derived from UEROOT. If using non-Launcher engines, or you
|
|
|
|
need to change some other environmental options per version (e.g. setting
|
|
|
|
`LINUX_MULTIARCH_ROOT` environment var), then you're recommended to instead
|
|
|
|
use the `-uever:` option to build one version at a time, and set the environment
|
|
|
|
(including `UEINSTALL`) specifically for each version.
|
|
|
|
|
|
|
|
This script will, however, handle changing the EngineVersion in the .uplugin
|
|
|
|
during the build, and resetting it afterwards.
|