For a while now I’ve been building all my plugins using the UBT command line, and including only the binaries, content, and build.cs files within the Plugins subfolder of the projects I use the plugins in. The reason is that if I copy all the source into every project where I need the plugin, I have to deal with source control (if the plugin is still in development) as well as bloated intermediate folders from rebuilding the plugin in the context of every project.
Am I correct in assuming that UE4 plugins should not need to be built separately for each project they are to be used with? I have had no issues at all using this approach until recently when I tried to run a packaged game incorporating a plugin, and hit an error on startup (see comment here).
The commands I use to build the plugin are:
UnrealBuildTool.exe UE4Editor Win64 Development -plugin "path-to-standalone-plugin/PluginName.uplugin" -nobuilduht
UnrealBuildTool.exe UE4Game Win64 Development -plugin "path-to-standalone-plugin/PluginName.uplugin" -nobuilduht
I then copy across the resulting binaries into the Binaries folder of the plugin within my project folder. All works as expected within the Editor, and packaging reports no errors, but packaged builds fail at startup.
Is there anything wrong with this approach? Are binary-only plugins not supported?
Since having this issue I’ve noticed that the dll/lib files generated differ in size depending on which method is used to build the plugin.
I can provide a repro project and plugin by PM on request.