Mesh.CombineMeshes ignoring light maps

I have been experimenting with a real time spot light as a flashlight in a mobile scene and found this doesn’t work too well with static batching.

To get around this I just tried the example script in the docs under Mesh.CombineMeshes to combine parts of my level into 1 mesh and so manually reducing draw calls.

This seems to work well, except that the light map uv’s are dropped.

I have a bunch of the same object, e.g. walls, floor etc. tiled around the level, but once I’ve combined things together, all the same mesh uses the same lightmap UV’s so all the wall sections have the same lighting.

Can anyone point out what is wrong with that script?

No one combines meshes in unity 5 anymore :frowning:

Is there a asset that can do it?

This is so frustrating, spent days on this and i also have the same problem and cannot get it to work. The last parameter (bool hasLightMapData), setting it to true does not carry forward lightmap data and UVs (generated by Unity’s import settings on the mesh).

mesh.CombineMeshes(combine, true, true, true);