Script for saving lightmapping data to prefabs. Used through the Assets tab in Unity. Place your prefbas in the scene with this script at the root. Set up your lighting and in the editor go to Assets->Bake Prefab Lightmaps. After is processed you can now spawn your prefabs in different scenes and they will use the lightmapping from the original scene.
First of all very cool script. I have a problem using this with prefab variants, if I bake the light on a prefab variant he is copying all meshes to the parent prefab.
I made a quickfix but I'm not sure about it. I commented out everything and only left the stuff in the else branch, it seems to work.
First of all very cool script. I have a problem using this with prefab variants, if I bake the light on a prefab variant he is copying all meshes to the parent prefab.
I made a quickfix but I'm not sure about it. I commented out everything and only left the stuff in the else branch, it seems to work.