Community Tutorial: Building Plugins

Simple solutions for compiling and building plugins for Unreal Engine - No coding required!!!

https://dev.epicgames.com/community/learning/tutorials/qz93/unreal-engine-building-plugins

2 Likes

Hello @Lucky_Monk57
I always have the same doubt, how can I package all python dependencies?
I just want copy paste my plugin to a computer without internet ;D

Hi alberto,

Yeah, python package dependencies is a sore spot on the portability of python based plugins. Our team internally is exploring solutions to make them more portable in the future.

@Lucky_Monk57 Python is a hell… Sadly is fashion…
I’m just unable to make a simple bundle, as in any other language… A package for everyone? impossible

Assume you have your plugin inside Engine/Plugins/ directory, everything set up accordingly. Also you have the source code of ‘the’ plugin…

Is there a difference between output of the ‘plugin build’ command and ‘full engine build’ command(talking specifically about the plugin)

In other way, what is the difference between output of ‘plugin build’ command and contents of ‘the plugin’ directory after a succesfull engine build command? Can I just copy and paste content of my plugin directory (excluding source code) and distribute it as plugin?

It seems there is a difference between building plugin with RunUAT and building it by creating c++ project, putting uncompiled plugin to project’s Plugins folder and just opening the project. Latter seems to work better in some cases.

E.g. needed to compile latest unreal-vdb plugin and I’ve used the .bat file below to do it:

set ue_location=L:\Software\EpicGames\UE_5.3
rem this where SparseVolumetrics.uplugin located
set source_plugin_path=C:\Projects\GitHub\unreal-vdb\
set output_plugin_path=%source_plugin_path%\build\SparseVolumetrics
"%ue_location%\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -plugin="%source_plugin_path%\SparseVolumetrics.uplugin" -package="%output_plugin_path%"

And it compiled successfully but using the plugin results in crashes like so:

But then I’ve created new c++ projects, moved source code there and just opened the project - and it worked, no errors. Tried to send to friend’s pc - also works. So I guess this way is more preferable in some cases.

Full RunUAT compilation log, just in case:

Running AutomationTool...
Using bundled DotNet SDK version: 6.0.302
Starting AutomationTool...
Parsing command line: BuildPlugin -plugin=C:\Projects\GitHub\unreal-vdb\\SparseVolumetrics.uplugin -package=C:\Projects\GitHub\unreal-vdb\\build\SparseVolumetrics
Initializing script modules...
Total script module initialization time: 1.00 s.
Executing commands...
Copying 3036 file(s) using max 64 thread(s)
Reading plugin from C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\SparseVolumetrics.uplugin...
Building plugin for host platforms: Win64
Running: L:\Software\EpicGames\UE_5.3\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe "L:\Software\EpicGames\UE_5.3\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" UnrealEditor Win64 Development -Project="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject" -plugin="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\SparseVolumetrics.uplugin" -noubtmakefiles -manifest="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealEditor-Win64-Development.xml" -nohotreload -log="C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealEditor-Win64-Development.txt"
Log file: C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealEditor-Win64-Development.txt
Parsing headers for UnrealEditor
  Running Internal UnrealHeaderTool C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Intermediate\Build\Win64\UnrealEditor\Development\UnrealEditor.uhtmanifest -WarningsAsErrors -installed
Total of 53 written
Reflection code generated for UnrealEditor in 3.2048015 seconds
Writing manifest to C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealEditor-Win64-Development.xml
Building UnrealEditor...
Using Visual Studio 2022 14.35.32217 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (14 physical cores, 20 logical cores)
  Executing up to 14 processes, one per physical core
  Requested 1.5 GB memory per action, 1.89 GB available: limiting max parallel actions to 1
------ Building 20 action(s) started ------
[1/20] Compile [x64] SharedPCH.UnrealEd.Cpp20.cpp
[2/20] Compile [x64] SharedPCH.Engine.Cpp20.cpp
[3/20] Compile [x64] SharedPCH.UnrealEd.RTTI.Cpp20.cpp
[4/20] Compile [x64] Module.VolumeRuntime.cpp
[5/20] Compile [x64] Module.VolumeSequencer.cpp
[6/20] Compile [x64] Module.VolumeStreamer.cpp
[7/20] Resource Default.rc2
[8/20] Link [x64] UnrealEditor-VolumeSequencer.lib
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeSequencer\UnrealEditor-VolumeSequencer.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeSequencer\UnrealEditor-VolumeSequencer.exp
[9/20] Link [x64] UnrealEditor-VolumeSequencer.dll
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeSequencer\UnrealEditor-VolumeSequencer.sup.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeSequencer\UnrealEditor-VolumeSequencer.sup.exp
[10/20] Resource Default.rc2
[11/20] Link [x64] UnrealEditor-VolumeStreamer.lib
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeStreamer\UnrealEditor-VolumeStreamer.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeStreamer\UnrealEditor-VolumeStreamer.exp
[12/20] Link [x64] UnrealEditor-VolumeStreamer.dll
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeStreamer\UnrealEditor-VolumeStreamer.sup.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeStreamer\UnrealEditor-VolumeStreamer.sup.exp
[13/20] Resource Default.rc2
[14/20] Link [x64] UnrealEditor-VolumeRuntime.lib
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeRuntime\UnrealEditor-VolumeRuntime.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeRuntime\UnrealEditor-VolumeRuntime.exp
[15/20] Link [x64] UnrealEditor-VolumeRuntime.dll
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeRuntime\UnrealEditor-VolumeRuntime.sup.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeRuntime\UnrealEditor-VolumeRuntime.sup.exp
[16/20] Compile [x64] Module.VolumeImporter.cpp
[17/20] Resource Default.rc2
[18/20] Link [x64] UnrealEditor-VolumeImporter.dll
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeImporter\UnrealEditor-VolumeImporter.sup.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeImporter\UnrealEditor-VolumeImporter.sup.exp
[19/20] Link [x64] UnrealEditor-VolumeImporter.lib
   Creating library C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeImporter\UnrealEditor-VolumeImporter.lib and object C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Intermediate\Build\Win64\x64\UnrealEditor\Development\VolumeImporter\UnrealEditor-VolumeImporter.exp
[20/20] WriteMetadata UnrealEditor.target
Total time in Parallel executor: 240.17 seconds
Total execution time: 282.34 seconds
Took 283,19s to run dotnet.exe, ExitCode=0
Building plugin for target platforms: Win64
Running: L:\Software\EpicGames\UE_5.3\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe "L:\Software\EpicGames\UE_5.3\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" UnrealGame Win64 Development -Project="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject" -plugin="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\SparseVolumetrics.uplugin" -noubtmakefiles -manifest="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealGame-Win64-Development.xml" -nohotreload -log="C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealGame-Win64-Development.txt"
Log file: C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealGame-Win64-Development.txt
Parsing headers for UnrealGame
  Running Internal UnrealHeaderTool C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Intermediate\Build\Win64\UnrealGame\Development\UnrealGame.uhtmanifest -WarningsAsErrors -installed
Total of 41 written
Reflection code generated for UnrealGame in 5.6455681 seconds
Writing manifest to C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealGame-Win64-Development.xml
Building UnrealGame...
Using Visual Studio 2022 14.35.32217 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (14 physical cores, 20 logical cores)
  Executing up to 14 processes, one per physical core
  Requested 1.5 GB memory per action, 3.14 GB available: limiting max parallel actions to 2
------ Building 3 action(s) started ------
[1/3] Compile [x64] Module.VolumeSequencer.cpp
[2/3] Compile [x64] Module.VolumeStreamer.cpp
[3/3] Compile [x64] Module.VolumeRuntime.cpp
Total time in Parallel executor: 29.76 seconds
Total execution time: 42.14 seconds
Took 42,23s to run dotnet.exe, ExitCode=0
Running: L:\Software\EpicGames\UE_5.3\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe "L:\Software\EpicGames\UE_5.3\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" UnrealGame Win64 Shipping -Project="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject" -plugin="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\SparseVolumetrics.uplugin" -noubtmakefiles -manifest="C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealGame-Win64-Shipping.xml" -nohotreload -log="C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealGame-Win64-Shipping.txt"
Log file: C:\Users\Andrej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\L+Software+EpicGames+UE_5.3\UBT-UnrealGame-Win64-Shipping.txt
Parsing headers for UnrealGame
  Running Internal UnrealHeaderTool C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\HostProject.uproject C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Intermediate\Build\Win64\UnrealGame\Shipping\UnrealGame.uhtmanifest -WarningsAsErrors -installed
Total of 0 written
Reflection code generated for UnrealGame in 0.736689 seconds
Writing manifest to C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Saved\Manifest-UnrealGame-Win64-Shipping.xml
Building UnrealGame...
Using Visual Studio 2022 14.35.32217 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Determining max actions to execute in parallel (14 physical cores, 20 logical cores)
  Executing up to 14 processes, one per physical core
  Requested 1.5 GB memory per action, 3.77 GB available: limiting max parallel actions to 2
------ Building 3 action(s) started ------
[1/3] Compile [x64] Module.VolumeStreamer.cpp
[2/3] Compile [x64] Module.VolumeSequencer.cpp
[3/3] Compile [x64] Module.VolumeRuntime.cpp
Total time in Parallel executor: 40.71 seconds
Total execution time: 43.99 seconds
Took 44,07s to run dotnet.exe, ExitCode=0
Reading filter rules from C:\Projects\GitHub\unreal-vdb\build\SparseVolumetrics\HostProject\Plugins\SparseVolumetrics\Config\FilterPlugin.ini
Loading FilterPluginWin64.ini
BUILD SUCCESSFUL
AutomationTool executed for 0h 6m 26s
AutomationTool exiting with ExitCode=0 (Success)
```ke

Thanks for the tutorial! Works as expected!