Create BSP and convert to StaticMesh in C++

I need some editable object in editor what converts in StaticMesh in game. I want to convert it automatically. I try to use UBrushComponent but I can’t found any documentation how use it. And how convert a Brush to StaticMesh. Can someone help me?

I need to know:

  1. How create simple BSP shape (for example box or plane) when Actor (who own UBrushComponent) just created.
  2. How convert it to StaticMesh.

2 years later, I have th every same question…
Did you get any answers ?