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.
624 stars 89 forks source link

Not working #8

Closed drallcom3 closed 4 years ago

drallcom3 commented 4 years ago
  1. Create new project: 2019 + Uwrp (Old 3D has the same issue)
  2. Create scene, set to subtractive lighting.
  3. Create plane+cube, add script, make prefab out of them.
  4. Bake lightmap, bake prefab from menu.
  5. Create new scene, put prefab in it.
  6. Hit play. The lightmaps on the prefabs kind of get loaded, but they have heavy black/white/pink artifacts. The whole prefab is also affected by realtime lighting. Does it not work or am I doing something wrong?

lightmap

Ayfel commented 4 years ago

Uncheck static in the new scene, I am out for a week, if you still have issues i Will check Next week, thanks

drallcom3 commented 4 years ago

Fix: I have to create the lightmap with Directional enabled. Now it seems to work (static or not doesn't matter). Would be nice if non-directional would work, too. I don't think mobile games ever use directional.

Ayfel commented 4 years ago

Oh yes i have that fixed and included, I will push it when I am back

drallcom3 commented 4 years ago

Looking forward to it. I can wait a week.