Download

Using CustomMeshComponent in a plugin?

Hello all! I’m working on a plugin for the engine and I need to use custom mesh component. But I can’t include it like this:


#include "CustomMeshComponent.h"

Where is it now? I am able to use it in blueprints. I’ve tried looking at GeneratedMeshComponent, but it hasn’t been updated to 4.5 yet. Any help? Thanks! :slight_smile:

Any help? Thanks!

This is a known issue, there are some workarounds: Using a plugin in C++ code - UE4 AnswerHub (Although I don’t know if they still work)

Anyway, there’s a wiki entry about Procedural Genneration which includes a class that has the same features as the CMC does, I think even more: https://wiki.unrealengine.com/Procedural_Mesh_Generation
And in addition here’s the forum post and discussion about PCG https://forums.unrealengine.com/showthread.php?1552-Generate-Procedural-Mesh

It’s in the CustomMeshComponent module, which you’ll need to add to the list of dependency modules in your Build.cs, but that won’t help much because UCustomMeshComponent isn’t currently exported from the module it’s defined in so you can’t really use it in C++.