Read Static Mesh Data into Procedural Mesh

You’re not getting all of the indices. With a triangle list that actually uses the indices correctly it will have quite a few more indices than vertices. Best thing to do is a separate loop that looks at indexBuffer.GetNumIndices() and copies all of them to the triangles array you have.

For an example, it’s possible to have a cube with only 8 vertices but still need 36 indices to makeup all 12 triangles.

To copy the indices, something like this should get them all.

for (int32 = 0; i < indexBuffer.GetNumIndices(); i++)
{
     triangles.Add(indexBuffer->GetArrayView()[i]);
}