Why is my plugin not working in a packaged build?

We created a project which utilizes an external .lib file, found in the ThirdParty folder, and this can be Launched, Packaged and Run without issue.

We then moved this code into an external plugin, and we find whenever we run the packaged game (or Launch), the build is successful however an instant crash occurs and error messages appear in the log of the type:

LogPlayLevel:Display: OurPluginProject: [2014.07.07-05.45.14:141][  0]LogConsoleResponse:Display: LogLinker:Warning: CreateExport: Failed to load Super for BlueprintGeneratedClass /Game/Blueprints/CustomPlayerController.CustomPlayerController_C
LogPlayLevel:Display: OurPluginProject: 
LogPlayLevel:Display: OurPluginProject: [2014.07.07-05.45.14:213][  0]LogLinker:Warning: CreateExport: Failed to load Super for BlueprintGeneratedClass /Game/Blueprints/CustomPlayerController.CustomPlayerController_CLogLinker:Warning: CreateExport: Failed to load Outer for resource 'K2Node_Event_DeltaSeconds': BlueprintGeneratedClass /Game/Blueprints/CustomPlayerController.CustomPlayerController_C
LogPlayLevel:Display: OurPluginProject: 
LogPlayLevel:Display: OurPluginProject: [2014.07.07-05.45.14:213][  0]LogLinker:Warning: CreateExport: Failed to load Outer for resource 'K2Node_Event_DeltaSeconds': BlueprintGeneratedClass /Game/Blueprints/CustomPlayerController.CustomPlayerController_CLogLinker:Warning: CreateExport: Failed to load Super for BlueprintGeneratedClass /Game/Blueprints/CustomPlayerController.CustomPlayerController_C
LogPlayLevel:Display: OurPluginProject: 

Why have these “Failed to load Super” and “Failed to load Outer” messages appeared? How can we resolve them?

My guess is that the plugin library is not being included into the packaged game - if there’s no plugin then the classes that Super and Outer are defined as, are not being loaded, because they are defined in the missing plugin. Have you verified that the library is included in your packaged build?

Hi Twiddle, how would we check that the library is included in the packaged build?

You should have a file like UE4-PluginName-Win64-Release.dll someplace in the packaged build, I would imagine.

That’s quite helpful, do you know where would we place the DLL?

In the past I have just tossed it directly into the binaries/win64 folder.

No success unfortunately. How did you generate that .DLL file? Just through compiling by including the Plugin Source in another project?

We have a file named UE4-PluginName-Win64.dll, but no UE4-PluginName-Win64-Release.dll.

That will be the file in question - I’ve been doing all my builds in Debug mode, which appends -Debug to the filename… I assumed release builds would append -Release or something similar. Evidently that is wrong - the file you’ve found is the one you’ll want to use. Was it included in the packaged build?

Are you actually including the CustomPlayerController class in your plugin?

You’ll need to show us the inner workings of your plugin !

Rama

Hi,

I have bundled together the plugin that we are using (I am doing some of the work with Chris) to test this problem:

DOWNLOAD

If you could take a look and see what steps we are missing that would be great!

I’ve written custom modules and sometimes found that compiling works but I actually have to move the module’s dll file to the binaries folder in order for the editor to run.
What I’m thinking is that perhaps your build process is working fine, but that you need to manually copy your resulting plugin module into the binaries/win64 subfolder of your packaged game.
If you install your packaged game on a machine, then grab the plugin dll from your development machine, and copy it into the binaries/win64 folder in the deployed copy, do you still get the crash?

Hi Twiddle, I’m not sure what you mean, how could we tell if it was included in the packaged build? The plugin is definitely being included in the build process insofar as the header is included for the plugin, however the packaging process cannot detect the classes within the plugin.

To clarify, our aim is to build a standalone plugin which we can then import into blueprint-only projects, without the need to compile the plugin alongside the game inside Visual Studio. Any thoughts?

Unfortunately, yes. We’ve tried renaming the files a number of times as well. Are there any steps in creating the package which define whether it can be run outside the editor perhaps?

There could be something in the .build.cs or the .uplugin files that is causing it - I vaguely recall seeing something about specifiers that indicate a editor module vs a runtime one. Other than investigating those I’m running out of immediate ideas.
You may get a better response from other contributors or staff by editing the title of this question to better reflect your issue, ie “Why is my plugin not working in a packaged build?”

Great idea, I’ve changed the name.
Thanks so much again for your help!

This behaviour has been resolved by upgrading to Unreal Engine 4.3.

Thanks everyone for your help and suggestions!

Hi, I know this is old, but did you guys solve this? if so, how? I have a very similar issue.

Me too in 4.27