How to add builtin plugins to c++

Hello!
So I am trying for some time to get unreal built-in plugins to work with C++.
So far I know that I have to add the name of the plugin to the *.build.cs file in the public module range.
I did that(tried using Niagara particles).And I encountered many problems:

  1. I tried adding on an already existing project(not many things changed,just added some classes) and says that “cannot open source file “NiagaraComponent.h””,but I created a new project and did nothing else and just added the “Niagara” to range like before and included the header to one of my .cpp files.And on the second project it worked…
  2. I though maybe I changed something in the first project and I tried adding more plugins to the new one to see if they still work and…they didn’t…The Niagara was still working but I tried adding “Paper2D”,“HTNPlanner”,“ActorSeqence”(random plugins) and they didn’t work again,same error.

Now I don’t know anymore what to do…any help?
Thank you!

Found the solution.So you have to add the plugin name in the *.build.cs PublicDependencyModuleNames.AddRange(…),
but you also have to enter the project location->right-click on the *.uproject->“Generate Visual Studio project files”.
Now I can use any header from the plugins.

2 Likes

Thanks a lot for posting the solution!

1 Like