Runtime Mesh Generation C++

Im trying to create an actor that will procedurally generate a mesh at runtime. I know UE4 has recently got a new method to do this with blueprints (Procedural Mesh Component) but I want to implement this in C++. Can this method be used in C++ or do I need to use the older method on the wiki.

New method:

Old method:

I’m using ProceduralMeshComponent in a full C++ project and it’s working like a charm.

The tricky part was in YourProject.Build.cs :

  1. add “ProceduralMeshComponent” to the PublicDependencyModuleNames
  2. add “ProceduralMeshComponent/Public” to the PrivateIncludePaths
  3. directly use UProceduralMeshComponent (or like i did, implement you own component based on UProceduralMeshComponent to get the generation stuff inside)

That’s it !

Perfect, Thank you very much