Where is the Create Static Mesh feature coded on Procedural Mesh Components?

I am wanting to look at the source code for the feature when you have a procedural mesh component instance selected in the editor, Create Static Mesh. However, I cannot seem to find it. Where is the source for this located at?

Hey BlackRang666-

You’re asking about the “Create StaticMesh” button in the ProceduralMeshComponent details panel, is that correct? If this is the case, this is part of the code for the details panel and can be found in the ProceduralMeshComponentDetails.cpp file. Specifically, you’ll want to look at the code in the CustomizeDetails function. This shows how the button is being setup as well as what other functions are being called when the button is used in the editor.

Cheers

What if I need to convert Procedural Mesh to static mesh inside my C++ code itself and not using the “Create Static Mesh” Button?

The CustomizeDetails function steps through what happens when the button is pressed so following that function should help you set up a similar process in your code. Specifically, the call to FProceduralMeshComponentDetails::ClickedOnConvertToStaticMesh should be helpful.

It helped. Thanks.

Hi BlackRang666,

I would also like to convert my mesh in c++, are you willing to post your solution here?
I could look trough the source myself and try to figure it out but it is easier to look at a working example :slight_smile:

Hi BlackRang666,

I would also like to convert my mesh in c++, are you willing to post your solution here?
I could look trough the source myself and try to figure it out but it is easier to look at a working example :slight_smile:

here is piece of code : Procedural mesh not saving all of its sections to static mesh - Programming & Scripting - Epic Developer Community Forums

2 Likes