Closed artnas closed 1 year ago
Possibly related to some very recent Unity editor bug, this was addressed in v1.95:
Are you sure you're on the latest version? Hovering over the blue "Bakery" text will show you the version number.
I just downloaded the asset today (v1.95) and patched it using "Check for patches". I'm on Unity 2021.3.15
Seems like this is the same issue as this: https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-95-rtpreview-released.536008/page-130#post-8737716
The lightmaps indeed dissapear after entering play mode
Weird... I can't reproduce it on Sponza, but I don't have the exact Unity version. Can you try if this works:
Will this work?
I created a new scene, added a reflection probe and baked it. Scene with reflection probe
Then took the new lighting data asset and selected it in my main scene
Main scene, edit mode
Main scene, play mode
The result seems to be the same
OK, I don't know then. Can you make a simplified copy of this project (e.g. just this scene, no material textures, scripts, etc... actually can even skip most props except for the walls) and send it to me for debugging? (just make sure it opens/bakes/shows the bug)
Reproduced it today on another project in Unity 2021. Can you try the latest patch now?
Or, just add this one line to the Start() of ftLightmapsStorage.cs:
https://github.com/guycalledfrank/bakery-csharp/commit/d7f0c9cf79c3bcfcf2c3c6de6434cba34800874f
It seems that since Unity 2021, if you have a lighting data asset in the scene (which is created if you have light/reflection probes), then there is a chance it will try to reload it after Awake() (but before Start()).
It works. Thank you!
Hey. Baking a lightmap works as expected, but after baking reflection probes, it only works in edit mode. Play mode makes the lightmap fully black.
This is a scene, not a prefab
Baked lightmap (looks the same in play mode)
After baking reflection probes this appears
Baked lightmap with reflection probes (Edit mode)
Baked lightmap with reflection probes (Play mode)
Am I missing something here or is this a bug?