Custom Mesh Component Not Showing In-Game

Hello,

I made a bunch of custom meshes in C++ using an array of triangles then generating them with UCustomMeshComponent. It all works fine until I hit “Simulate” or “Play” then all the generated meshes disappear. I was wondering why this happens and how I can fix it.

Thank you,
~Adam

Are you re-creating your custom meshes in the constructor?

You’d need a different class for each shape if you were doing that

if you are NOT doing that

then the running of the default constructor is probably eliminating the mesh?

Try adding all the triangles in the constructor and see if that helps.

Or you can just run a BP node to recreate the mesh after runtime starts in PIE

:slight_smile:

Rama

Did you ever manage to solve this problem? I am running into this too.

maybe its also being culled by unreal, try to increase the object bounds or try enabling backface rendering in the shader