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.
645 stars 90 forks source link

增加shadowmask支持 #6

Closed AtheosCode closed 4 years ago

Ayfel commented 4 years ago

Oh by the way I also saw you commented out the Baking part of the code, what is the intended workflow in this case? Bake from the lighting tab?

AtheosCode commented 4 years ago

Our process is to bake a single scene of the art, and then call this script after the baking result is completed, instead of calling baking through this script, so I commented out the baking code, this code I have in Unity2019.2.2f1 Test, support switching scene, support for packed AB

Ayfel commented 4 years ago

I am checking and it seems some changes revert back on some edge cases that are undesirable. Like having the same prefab several times will make that lightmap be loaded many times in memory image

What I will do is take the new features you incorporated such as shadowmask and incorporate it into the main branch. Also the batching statically breaks a general workflow so I believe is better to leave that out of the functionality of the main project. And if someone wants to do it they can manually as you suggest. Let me know what you think, I will be adding those features soon.

Ayfel commented 4 years ago

Added shadowmask, thank you a lot! See latest commit