I am experiencing an issue packaging a project that uses a code plugin I also created.
The steps I have taken are as follows:
Created a project
Created a project plugin within that project, and developed the plugin
Set plugin platform whitelist to Win32 and Win64
Confirmed plugin compiles correctly by compiling all platforms in VS, and packaging the plugin in the editor
Copied the plugin into Engine/Plugins/Runtime
Edited the uplugin file, set engine version and Installed to true
Created another project (examples project), enabled the custom plugin
Created content in the examples project that uses objects from the code plugin
Tested content as working correctly in PIE
Successfully cooked examples project in windows
However, when I attempted to package the examples project itself, I receive the following error:
ERROR: Missing precompiled manifest for ‘TestPlugin’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in TestPlugin.build.cs to override
I am unable to resolve this problem.
I tried adding ‘PrecompileForTargets = PrecompileTargetsType.Any’ into the plugin build cs file, but it didn’t make any difference. The uproject file for the example does list the plugin in the Plugins section, which is set to enabled. The uplugin file defines the plugin module, sets the type to runtime, sets loading phase to default, and has the whitelisted platforms.
The strategy about plugin developing is always changing from UE4.14 to UE4.24, I’ve had enough.
After UE4.20(inclusive), if you want to release your plugin as binary built style, and let users can use your plugins by putting them under project folder, you can try this:
Package your plugin. Open Edit->Plugins, in the plugins list, locate your plugin, click the [package] text, and pick a destination folder, then your plugin will be packaged very well. Notice: this compiling method is more strict than visual studio does, so you may need to modify your c++ code a little bit, especially the #include statements.
After you have packaged your plugin, add bUsePrecompiled = true; to your plugin build.cs file. Save it.
Zip the packaged plugin, send to user.
For me, the above instructions works well for users’ BP projects. But for users’ C++ projects, exactly for Debug configuration C++ project, it not work! Because, the package operation above is only package the Develop/DevelopEditor configuration for your plugin. I was in great pain about this ■■■■. Finally, I choose to modify the UBT C# code to let the package operation also build the Debug/DebugEditor configuration for plugin. If some one need, then I paste the modifications at here.