Unwrapping.GenerateSecondaryUVSet() flips triangle order

As the title says, when I call GenerateSecondaryUVSet(mesh) it screws with my triangle order, and in some cases even adds vertices. Why is it modifying the mesh? I expect that it would just generate the UV2 and be finished.

I realize I can use GeneratePerTriangleUV() to achieve the same effect, but I’d prefer to avoid the whole merging business if possible.

Okay, so I’ve forgone the “easy” way and instead am now generating my own normalized UV2 maps. Unfortunately, the lightmaps still look terrible. What exactly are the requirements for the UV2 coordinates to work with lightmapping?

Here’s the results (the blue dots are UV coordinates and the gray outline around them is the bounding box. UVs are generated per quad, with each quad containing 4 vertices).