Generate Procedural Mesh

[=;229704]
Has anyone had any luck generating a procedural mesh as a static mesh? My procedural mesh actor is a child of AStaticMeshActor, and I’ve tried:



	GenerateCube(triangles, cubeSize, cubeSize, cubeSize, FVector(0.f, 0.f, 0.f), false, false, false);
	mesh->SetProceduralMeshTriangles(triangles);
	StaticMeshComponent->SetStaticMesh(Cast<UStaticMesh>(mesh));

with no luck. Ideally I’d like to be able to bake lighting on the mesh which isn’t possible as a procedural mesh. Is this even possible?
[/]

Yesterday i was tried too. But unreal crash whith this code. I’d like to be able to bake light and vertex paint. I see that the proceduralmeshcomponent and the staticmeshcomponent is a child of one class - meshcomponent. May be its possible to make proceduralmesh with the staticmesh opportunities. But i dont know how. Now i working with this idea. If u find how pleas send a message.