Ayfel / PrefabLightmapping

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.
618 stars 88 forks source link

new feat: add script to Empty Game Object instead of object ? #31

Closed Nico3D1982 closed 3 years ago

Nico3D1982 commented 3 years ago

Hi, I would like to know if the features below would be possible: Can we imagine to add your script to an Empty Game Object and then specify the concerned baked object and maps? In our project we are using asset bundle for 3D object but also to save "settings" and load them depending of the needs. Having the same with your script would unlock the ability to have multiple baked maps on the same object. What do you think or do you have any clue how to manage multiple baked maps ? Thanks for your reply and your great sript.

Ayfel commented 3 years ago

You can do it easily. Just make a prefab with the script (let's call it prefab A), and bake it in some scene, now this stores some lightmaps. Then go to another scene and make another prefab with the script, prefab B, which has different lightmaps (from different scene and lighting). Now make a prefab C with prefab A and B as children.

image