I want to use the ProceduralMeshComponent for creating a box with texture. Something like this:

This cube has 8 vertices and 12 faces. The texture’s coordinates are 4.

The problem is that the ProceduralMeshComponent wants the uvs per vertex, so each vertex must have only one uv, while in my case each vertex should have 3, since each vertex belongs to 3 faces.

The only solution I can think of is to split the vertices, so that each face uses unique vertices. This is the trick done by UKismetProceduralMeshLibrary::GenerateBoxMesh, which creates the box using 8 * 3 = 24 vertices.

My question is: is there a better way to handle this? Is there a way to use just 8 vertices and somehow tell Unreal that the vertices may have multiple texture coordinates?