Hello all,
Yes I successfully made it work! I have Unity 4 lightmaps in Unity 5. But be aware that this is not an easy and clean solution. I’ll try to explain my process as best as I can:
Start in Unity 4 by exporting all lightmapped GameObjects Meshes (those with lightmapIndex != -1 on their Renderers) on the file system in a homemade format. I personnally made a text file with separator characters. You need to export everything you will need in Unity 5 to recreate a Mesh object, so triangles, normals, tangents, sub meshes, etc, etc. This can be done with some Editor scripts looping on all of your exported scenes, then all lightmapped objects. You have to make sure all exported models have unique name, or at least they are exported uniquely.
Still in Unity 4, you must store in a component added to all lightmapped object the data needed for the lightmapping system: that is offset, tiling and lightmap Index. You can also do that with Editor scripts that loops on the scenes, then add a component to the objects, then Save.
Then, in Unity 5, you can upgrade your project. Once this is done, there is two things to do: import the exportes meshes, create new Mesh class instances, then serialize these in the object’s MeshFilters components. This way, your models are not links to the Model asset in the AssetDatabase, but a serialized version of the exact data from Unity 4, including lightmaps UVs.
Then, you must inject lightmapping data in the multiple objects Renderers, data we stored in the components.
And last but not least, there must be code that injects the actual lightmap textures into LightmapSettings, so you must match the lightmapArray from Unity 4, also mode, etc.
You may need to turn off Static Batching options in rendering, this option seems to do weird things to the models data.
Also, your dynamic lighting may not be aware that certain objects are lit, as we are injecting stuff into the lightmapping system. You may need to work on the layers bitfield of your lights.
And lastly, your lightmap textures may need to get tweaked in their import options, to have the actual pixel perfect colors from Unity 4.
So here you go, I hope I didn’t miss a step. Let me know if it helps!