How include headers of Destructible ? How include header from plugin ? UE 18

Hello!
In 18 Unrial Engine update all Destructible’s files were moved to plugin:
…\Epic Games\UE_4.18\Engine\Plugins\Runtime\ApexDestruction\Source\ApexDestruction\Public\DestructibleMesh.h and etc

And now I can’t include it to my plugin. I try to add this to Build.cs:


 PublicDependencyModuleNames.AddRange(new string] { "ApexDestruction" });
 PublicIncludePathModuleNames.AddRange(new string] { "ApexDestruction" });
 PrivateIncludePaths.AddRange(new string] { "ApexDestruction/Public", "ApexDestruction/Classes", "ApexDestruction/Private" });
 PublicIncludePaths.AddRange(new string] { "ApexDestruction/Public", "ApexDestruction/Classes", "ApexDestruction/Private" });

And it to .uplugin:


"AdditionalDependencies": 
        "Engine",
        "ApexDestruction"
      ]

But after this I have error again. I included these files, and you can see, what they are underlined in red:
error1.PNG
But the compilation was successful…And when the project was loaded I got an error:

Please help :frowning:

I think I have error while loading project because I include headers incorrectly. So if anyone know how include it correctly please help…

Just add “ApexDestruction” to the PublicDependancyModuleNames list and don’t put it in the others in your .Build.cs file.

Then just include the header file you need, like:

#include “DestructibleMesh.h” // don’t put any path information here, just the header file name.

Your .uplugin file will also need “ApexDestruction” added to the ‘Plugins’ list of plugins that your plugin depends on.

Thank so much! For me helped adding to .uplugin:


  "Plugins": 
    {
      "Name": "ApexDestruction",
      "Enabled": true
    }
  ]