This allows users to run the plugin in the Unreal editor, but prevents them from creating a package game. In our case we go an extra step and also delete the non-editor binaries (Binaries\Win64\*.lib) and non-editor intermediate files (Intermediate\Build\Win64\UE4). Whereas our MercunaPathfinding module is an internal module, so we delete Source/MercunaPathfinding/Public.įinally, you will need to leave the *.build.cs file intact for UE4 to be able to recognise the module. However, not all the source should be removed.įor each module within the Source directory, the Private directory should be deleted, but whether the corresponding Public/ Classes folders should be removed depends on whether your module offers any functionality that can be used directly from C++.įor example, in our main Mercuna module we have several custom actor types and components that users can create and use in their code, so we leave the Source/Mercuna/Public directory in place. In our case we want to remove the source. You would normally distribute this entire folder to users. The OutputDir will contain the source code, binaries, intermediate files and any extra required content your plugin needs to run. Where UE4Dir is the directory where UE4 is installed and OutputDir is the name of the directory you want the resulting build to be placed. UE4Dir\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Rocket -Plugin= Plugin.uplugin -TargetPlatforms=Win64 -Package= OutputDir This can be done using the UnrealBuildTool with the following command: The first stage is to build the plugin for distribution in the normal manner. It took a bit of trial and error figuring out how to get this to work, so in this post I will outline the process we have settled on after several iterations.
Fortunately, it is possible, though non-obvious, to create a binary only plugin that people can use without the source code. However this can often be undesirable, as for example, in our case where we want to offer an evaluation version of Mercuna for people to try out but don’t want to make our full source publicly available.
Unreal Engine 4 has been engineered with the assumption that code plugins will include their full source code when distributed.