How to package C++ plugin without private source code (only binaries + headers) in 4.20?

To add to this, according to my test, from 4.20.x onward you can deploy and use a Plugin without any source files in it (no header and no cpp) as long as:

  • It has been packaged from the Plugin window (click Package under the plugin)
  • There is an Intermediate folder from the packaging, which contains all precompiled objects and other auto generated files
  • It still contains the plugin Build.cs file inside (but all Private/Public folders can be removed)
  • The build file contains the statement: bUsePrecompiled = true;
  • There is Binaries folder with the plugin dll
  • There is a Resource folder with the plugin icon
  • There is a Content folder if the plugin contains any content

Such plugin will work in the Editor and will package together with the game. This works with BP only projects of course. For plugin exposing C++ functions you still need at least the headers in the Public folder.

Cheers,
Marco.

12 Likes