BuildPlugin support for Dedicated Server (UnrealServer) precompiled plugins

Hello,

We are trying to distribute a precompiled Unreal Engine plugin without source code and use it in a project that targets both:

  • Android client builds
  • Win64 Dedicated Server builds

The plugin is packaged using RunUAT BuildPlugin:

RunUAT.bat BuildPlugin ^
    -Plugin="MyPlugin.uplugin" ^
    -Package="OutputFolder" ^
    -TargetPlatforms=Win64 ^
    -Configuration=Shipping ^
    -EditorConfig=DevelopmentEditor ^
    -Rocket

The plugin module is configured as follows:

PrecompileForTargets = PrecompileTargetsType.Any;
bUsePrecompiled = true;

and the .uplugin contains:

{
    "Name": "MyPlugin",
    "Type": "Runtime",
    "WhitelistTargets": [ "Game", "Server" ]
}

The packaged plugin works correctly in the Editor and for Game targets. However, when building a Dedicated Server target, Unreal Build Tool reports:

Missing precompiled manifest for 'MyPlugin'

After inspecting the packaged plugin, we noticed that BuildPlugin appears to generate precompiled artifacts for UnrealGame, but we do not see equivalent UnrealServer precompiled manifests.

Our questions are:

  1. Is RunUAT BuildPlugin expected to generate precompiled artifacts for Dedicated Server targets (UnrealServer)?
  2. If yes, what is the recommended configuration to ensure Server manifests (.precompiled files) are generated and included in the packaged plugin?
  3. If no, what is the recommended workflow for distributing a source-free plugin that must support both Game and Dedicated Server targets?
  4. Is there an official way to package a plugin so that it can be consumed by Server targets without requiring the original C++ source files?

We are using Unreal Engine 5.6.

Thank you for your help.

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

Hi,

Building server plugin is not supported out of the box. Also, the -Configuration and -EditorConfig from your command are not read by BuildPlugin, the configs are hardcoded (Editor=Development and Game/Server=Development+Shipping). You can look at the code in D:\UE_5.6\Engine\Source\Programs\AutomationTool\Scripts\BuildPluginCommand.Automation.cs to understand the details.

Being said, I asked the AI to generate the code to build the server binary too. The changes seem ok and the AI was able to build a plugin for the server, I didn’t test further if the resulting binaries works with the dedicated server but the generated code can help you investigate more and get it working. See the .zip attached. It contains the updated version of D:\UE_5.6\Engine\Source\Programs\AutomationTool\Scripts\BuildPluginCommand.Automation.cs, you should be able to easily integrate and test the changes.

The modified command line to build the server goes as following:

  RunUAT.bat BuildPlugin ^
      -Plugin="MyPlugin.uplugin" ^
      -Package="OutputFolder" ^
      -TargetPlatforms=Win64 ^
      -Server ^
      -Rocket

Regards,

Patrick

[Attachment Removed]

Hi Patrick,

Sorry for the delay with my response, I was in vacation and after in a business trip.

Thank you very much for your reply and for providing the modified

BuildPluginCommand.Automation.cs.

I tested your changes and I can confirm that adding the -Server option now generates the Intermediate/Build/Win64/UnrealServer directory as expected, which was not the case with the stock BuildPlugin command.

However, I’m still unable to use the packaged plugin without its source code in a Dedicated Server build.

When building my project, Unreal Build Tool still attempts to rebuild the plugin instead of consuming the precompiled binaries.

During the build I can see it reaching the link stage for MyPlugin (creating UnrealEditor-MyPlugin.dll / UnrealServer-MyPlugin.dll depending on the target),

whereas I would expect it to directly use the precompiled plugin.

As a result, if the plugin source .cpp files are removed, the build still fails because UBT tries to rebuild the module.

Could you clarify whether your changes were only intended to generate the Server precompiled manifests, or have you successfully built and consumed a source-free precompiled plugin with a Dedicated Server target?

If you managed to make it work, could you indicate whether additional changes are required (AutomationTool, UBT, Build.cs, plugin packaging, etc.) to prevent UBT from rebuilding the plugin?

Thank you again for your help.

[Attachment Removed]

Hi,

Sorry for the delay, we are back from the summer break and going through the questions. I just tested generating the plugin, I didn’t test more because this is not officially supported. Are you trying to use your prebuilt plugins with an installed engine (prebuilt engine) or a source tree engine? I previously assumed you were using an installed engine to consume the plugin because the game/editor were working. If the plugin is use with a source tree, I don’t expect it work. This is not supported. Prebuilt plugins should only be used with an installed engine, and the plugin must be built against the same engine source source code that made the installed engine.

Now, if your plugin logic is standalone (not relying on UE API), then you can just wraps a prebuilt library with it’s headers. We do that for several third party libs and BinkMediaPlayerSDK is a good example. See \Engine\Plugins\Media\BinkMedia\Source\BinkMediaPlayerSDK\BinkMediaPlayerSDK.Build.cs. Note that the source are provided as a courtesy in .7z files, but they are used by the build process, UBT only use and expose the .h and the .lib files and you could do the same.

Depending on your use case, it may not be supported. If you are using an InstalledBuild, I might be able to figure out why it tries to rebuild the dedicated server plugin, we likely distributing dedicated server plugin with our UE vanilla distribution on the EpicGame Launcher, so I think it should work with an InstalledBuild.

Regards,

Patrick

[Attachment Removed]