- Home /
External lightmaps deleted on build
We're looking to move a project over from Unity 4 to Unity 5, as such we're currently doing a few tests to ease the transition. One of these is Lightmapping; we would rather not use Enlighten when we eventually make the full move - opting instead for an external solution which we would then fold back in to the project ourselves.
As a test case, we've managed to extract lightmap data from a Unity 4 project (indices, offsets, textures etc) and reimport this back into the upgraded project. We have a script that reverts all renderers in the scene back to their previous states, and updates LightmapSettings as is appropriate. After running the script all looks fine within the editor, and our lightmaps are shown in Unity 5's Lighting window. At this point it looks very similar to how the scene looked prior to the upgrade.
However, once the scene is built/played then all data seems to be reset, with lightmaps being cleared or, if they had been baked prior, reverted to Enlighten lightmaps. Additionally, the indices and offsets on renderer components are reset.
Documentation on Unity 5 lightmapping seems to be lacking at the moment, has anybody else run into this problem before?