Home Unity

How to force a LightmapSnapshot?

When I bake lightmaps for a scene, save it, then save as a new scene, sometimes Unity makes a new lightmap folder and sometimes it reuses the old folder. How do I get it to always use the new folder? I try assigning the LightmapSnapshot, but that doesn't seem to take hold, it still uses the wrong folder. Wish they had something about this in the docs. :(

Replies

  • kio
    Offline / Send Message
    kio polycounter lvl 16
    maybe youll have to 'fix' the guid references by yourself?

    if your project is set to serialize in text, you can open up scenes and prefabs with a text editor to your liking. the yaml format should be quite readable, so maybe youll just have to some copy paste fixing..

    I have used this on other problems with unity (retargeting animation curves...), but not with the lighting stuff - so it might or might not work.
  • Eric Chadwick
    OK, figured it out. Save as a new scene. Quit Unity. Make a backup of the original scene's lightmap folder (commit to source control). Load the new scene, bake. This deletes the original lightmap, and creates the new lightmap (derp Unity, derp). Then I just restore the deleted lightmap folder, and I'm done.
Sign In or Register to comment.