Package plugin shipping configuration

Does anyone know how to build plugin separately with Shipping configuration?
I have used BuildPlugin from RunUAT with Configuration set to true, it does compile shipping for the plugin but the dll and pdb are no where to be found after…
Been stuck like this for weeks already :frowning:

As far as my understanding goes, Shipping configuration builds in monolithic mode which statically links the project code with all modules together in a single executable.

In monolithic build, the only dlls you can load are the third-party type ones. They cannot depend on engine code since there are no symbols left to link to at runtime.

If you are wondering where your plugin code is, well, it’s in the executable.

If you really need a plugin dll, maybe you can refactor it into a third-party type library.
https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/BuildTools/UnrealBuildTool/ThirdPartyLibraries/

If you want both (a dll plugin with engine runtime linking), I encourage you to try building in “Modular” mode instead of Monolithic. I can’t really say how well/bad that will go as there is no documentation nor recent stories regarding this topic, that I am aware of.
Only bit of information I found, from @Ben_Marsh who seems to be an UE dev, in this thread (but then again, it’s old)
https://forums.unrealengine.com/t/plugins-are-only-working-for-people-in-a-package-game-if-they-have-c-project/8455/45

Yep we are already building it in a “modular” mode. I found out Satisfactory and Robo Recall both have working mod/plugin in shipping dll for sharing as well. Digged into the source of Robocall, there is a custom build command for RoboRecall that seems to package plugin in shipping mode but the source for it is not available in the mod kit :frowning:

As long as your project’s Target.cs has LinkType = TargetLinkType.Modular, all you need to do is compile the solution in visual studio with Shipping configuration.

image

It will rebuild engine source and project if necessary (if not already built or if modified), but after first build it will only rebuild parts you have modified (ie. the plugin).

It should produce a DLL in the plugin folder
Plugins/YourPlugin/Binaries/Win64/UE4-YourPlugin-Win64-Shipping.dll

I am not familiar with plugins including content, but I expect it should work the same, with plugin’s cooked content ending up in
Saved/Cooked/WindowsNoEditor/YourPlugin/...

Unfortunately I have tried this before, and it just recompiles the MyGame-Win64-Shipping.dll instead

Update: Seems like my previous commit overrides the LinkType = TargetLinkType.Modular in my target file. Will update you how it goes!

Update, sorry for the slow reply but it is working now (minus some plugins are failing to compile atm). Thank you a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.