Adding Actor-derived class to a plugin causes a lot of errors
I'm writing a plugin based off the Blueprint Library plugin template. Compiling based off the template with no additional classes works as intended.
I've added a class to it based off of Actor using the New C++ Class wizard from the Content Browser. The one compiler error caused by this mentions that I need to include MyPluginPrivatePCH in the MyActor CPP file.
Doing this produces a deluge of compiler errors [Link] in ComponentInstanceDataCache.h, EngineBaseTypes.h, Map.h, and UObject.h, the nature of which has me a bit perplexed. I'm organizing something here incorrectly, but I haven't got the foggiest idea what.
Current files are as follows:
The Actor has no changes to it except that I've added an #include to MyPluginPrivatePCH in the CPP, per the instructions in the Visual Studio output.
Finally: In Build.cs, I am including Core, CoreUObject, Engine, InputCore, and UnrealEd as private dependency module names.
Found my answer.
You must edit MyPluginPrivatePCH.h to #include "Engine.h". Otherwise it builds all of these in an incorrect order, causing the errors listed in the attached file. Then the plugin builds properly, engine classes and all.
answered Sep 12 '16 at 04:44 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here