How to properly package project plugins?

I have a C++ project with some third-party plugins in the project’s plugin folder.

When I package the project (Shipping), the plugins don’t get copied over and don’t work in the packaged game.

I can get it to work by copying the plugin directories into the Engine\Runtime\Plugins folder of the packaged project. But doing this also copies over source code and Intermediate files, plus other stuff that might not be used, which is a waste of space. And it’s a manual process.

Is there some automated way to make sure only the files/libraries I need from the plugins are included in the shipping build? I looked at the Packaging documentation but there isn’t even any mention of plugins. This seems like a very basic thing and it’s frustrating to not find straightforward documentation on it…?

So it should work just fine. What are these plugins exactly?

GC FSM, UnrealEnginePython, WebUI, plus potentially others in the future. As I said, when I package the project as Shipping, they don’t work, since they are not in the build directory tree. They work fine once I copy them over manually. (And of course they work fine in the editor)

Am I missing something in the build or packaging config settings or something? I feel like it should be something simple…

[Edit] I should mention that this is with a custom 4.22.3 source build, packaging & running on Win64. Did I mess something up in my engine build? Does it “just work” for people using the Launcher version?

Really, no one? This seems like a pretty basic task…

1 Like

Did you ever manage to get this to work?

Did you try as development editor?

I haven’t, no. Just been trying to do it manually

I have the same problem. I tried to put the list of my plugin files into Config/MYPLUGIN.ini, but that also didn’t work. And even manually copying the files to the package directory also does not work.

1 Like

I still can’t start my package - I tried all possible directory structures for my plugin, without success. Using strace, I can see that the executable never tries to load my so-file (although it finds my ini-files and other so-files in my plugin directory), and I always get “please ensure the plugin is properly installed”. As I can’t buy a plugin under Linux, I can’t even buy an example. And I can’t find this in the documentation. If someone would be so kind to explain me the conditions for an UE4 package to find the so-file of a plugin…

1 Like

The following code in the Build.cs of my plugin resulted in the so-file being copied to the package directory :
string LibBinaryPath = Path.GetFullPath(Path.Combine(ModuleDirectory, “…/…/Binaries”));
RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(LibBinaryPath, “Linux”, “libUE4Editor-MYPLUGIN.so”)));
Unfortunaly, the package still refuses to load this file when I starts and throws “please ensure the plugin is properly installed”.

Has this been solved in '22?

I have an idea, try making an “autoload” which when the game starts it’ll require your project to find those plugins to successfully start the game. Some Developers use this strategy to “force” control over forceful scripts.

Go to your ini or json file (will vary per your project) and input a new plugin (could even be a .conf or .xml) bit for an example plugin; once you recompile build your project. After that, open your file which informs the engine or framework of the plugins and see if your bit is still there or has been overwritten.

If your bit has been removed, you must try another method for requiring them before the project begins its boot -that way you can “man-in-the-middle” before implicit handling.

Hope this makes sense!

1 Like

Still having this issue on 2023 :confused:
Anyone has a solution?