Getting UVs and colors to work with dynamic mesh using FDynamicMesh3

After some digging around, this post what ended up solving it for me:

I am doing these (not sure if all of them are necessary)

	FDynamicMesh3 newMesh;
	newMesh.EnableAttributes();
	newMesh.EnableVertexUVs(FVector2f::Zero());
 
// generate vertices with UV logics ....

	UE::Geometry::CopyVertexUVsToOverlay(newMesh, *newMesh.Attributes()->PrimaryUV());

Voila!

2 Likes