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.
I’m having the
problem. The only “solution” I found is by manualy changing Enabled to false in my .uproject file.
I need to find out more about this issue.
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.
can you show how to make this modification. I downloaded someones plugin and Im having this issue. I have no clue how to use C# or where to add this line. Thanks : )
go to the folder of your plugin, then to the folder that says “Source” and go to where it says the name of your plugin and you will find the .Build.cs file
I just ran into a similar issue and wanted to document the fix since it’s a bit different from above.
I was trying to package an editor-only plugin and was getting the following error:
Missing precompiled manifest for ‘MessageLog’, ‘C:\Program Files\Epic Games\UE_5.3\Engine\Intermediate\Build\Win64\UnrealGame\Shipping\MessageLog\MessageLog.precompiled’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in MessageLog.build.cs to override. If part of a plugin, also check if its ‘Type’ is correct.
The issue in my case was that this plugin needs to depend on UnrealEd module. The fix required 2 changes:
In the [Plugin].Build.cs file conditionally depend on the UnrealEd module:
the solution is indeed to remove editor-only modules from the shipping build in *.build.cs, like by guarding them by
if (Target.bBuildEditor) {}
This should be done for all your modules: as plugins as well as your main game module.
this time it took a some time for me to realize what module i have to remove, so note that: UnrealEd and FunctionalTesting does reffer MessageLog and UnrealEdMessages.