Plugin Packaging Help Needed

I run this from command prompt :Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=[Path to .uplugin file, must be outside engine directory] -Package=[Output directory] -Rocket

I get lots of errors from engine files.


UnrealBuildTool: C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Classes\Components/BillboardComponent.h(15): error C2504: 'UPrimitiveComponent': base class undefinedC:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Classes\Interfaces/Interface_CollisionDataProvider.h(66): error C2504: 'UInterface': base class undefined

As an example.


UnrealBuildTool: C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\HostProject\Plugins\LookAlive\Source\LookAlive\Public/LookFocusComponent.h(14): error C2065: 'Z_Param_FromLocation': undeclared identifier

This one comes from a class I made that extends BillboardComponent.

The plugin compiles with no warning or errors in Visual Studio, and it works fine in game.

Can anyone give their two cents on what causes these errors? (I have pages of errors, but only picked two as examples)

Only the top most error is really relevant. What is the first error that ever happens when you try to package the whole project instead of only the Plugin?


MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Classes\Interfaces/Interface_CollisionDataProvider.h(66): error C2504: 'UInterface': base class undefined
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Classes\Interfaces/Interface_CollisionDataProvider.h(67): error C3646: 'Super': unknown override specifier
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Classes\Interfaces/Interface_CollisionDataProvider.h(67): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Those are the first three errors when I try to package the whole project. They seem to be largely the same as when trying to package only the plugin.

I get the same errors. Should I be expecting something different? The project is just a nearly blank project with this plugin in its plugin folder. The only project code is a blank MyActor extending from Actor.

These errors look like your plugin needs to include a missing module in its Build.cs file, but hard to know which module its needs.

I kinda thought that, but I am already including modules that contain classes I have made child classes of. Any way to figure out what modules I need besides guessing and checking?

I have no idea.
My latest work required to include “GameplayTasks” module and I had absolutely no idea I had to use that module until I read from an Epic employee that it is required because the AIModule is relying on it since 4.12…
It’s frustrating sometimes.

Is it normal for adding modules to give you compile errors in Visual Studio? I added the UnrealEd module and then got a bunch of errors from UnrealEd.h

It appears that once I added extra modules, then even after removing them, I start getting the same errors in visual studio as I was getting from packaging.

It’s not possible to package including Editor modules.
Epic doesn’t allow any game to ship with editor code in it.

That makes sense. I don’t know for sure what I did, but now I have the module list same as before and the project packages. However, the plugin by itself still does not package. It gives a single error.


fatal error LNK1181: cannot open input file 'C:\Users\Fang\Desktop\Engine\UnrealEngine_4.12.5\Engine\Plugins\2D\Paper2D\Binaries\Win64\UE4-Paper2D.lib'

I got this even when running command prompt as administrator.
Any ideas?

Is Paper2D included in Build.cs?
Is that .lib file in directory it says is missing?

If your plugin doesn’t use Paper2D and it is already built this shouldn’t happen.

I have a PluginProject-Paper2D.lib, but not a UE4-Paper2D.lib…

Ok… renaming worked, but I just got a new error for a new .lib. All my .libs are prefixed with the name of my project instead of UE4

My best guess is that since you have specified “-Rocket” argument, UBT is expecting pre-compiled libraries (UE4-*.lib) which are missing if you build the engine from github.

Why would they give my a command ending in -Rocket and specifically tell me to use github sourced engine in the same email?

Sure enough, it works if I use a binary version of the engine.