Unity 4 -> 5.2.1 Lightmaps disappear when scene is closed

I am updating a Unity 4 project to 5.2.1. I found out I had to update the Lightmapping/rebake the scenes. I’m not very experienced with lightmapping, but I’m trying to catch up.

It takes a long time for some of my scenes (between 1 and 30 hours, depending on the scene) which is one thing. but it doesn’t seem to save the lightmapping. I haven’t seen it crash or stall out- it always finishes given time.

Before closing a small scene, I can see that I have 5 directional lightmaps: 5x1024x1024px. But if I close and reopen the scene, it tells me I have 0 lightmaps. If autobaking is on, it starts rebaking as soon as the scene is open.

I heard that I should clear my GI cache, so I did this. I also tried deleting my library and reimporting all of my assets. Now the rebaking of small scenes is much faster- about 30 seconds instead of 30 minutes… but it’s still rebaking them. If I have autobaking on and make a build, it rebakes them (the fast version). If I have autobaking off and make a build- I have no lightmaps. If I play the scene in editor (which includes a scene.load for me) I have no lightmaps.

I have googled and found an old conversation on it here:

But that sounds like issues directly related to the Beta.

I can post my GI values, but here are some important ones:
Precomputed Realtime Res: 1 (.5 in larger scenes)
Baked Res: 90 texels per unit

Any help?

It seems I have at least one scene that keeps its lightmaps. But the other ones I’ve tried all come up empty no matter how many times I’ve baked the scenes. The ones set to autobake start baking at open.

I have compared the scenes in the ways I can think- I haven’t found any differences that account for the behavior.

Is anybody else experiencing anything like this?

I’m having the exact same problem on 5.2.1 although my project was created in it from scratch and not updated from Unity 4. As a workaround, I have turned off Auto when I’m about to close a scene but this is less than ideal. I haven’t found anyone else asking about this so I assumed I must have been doing something wrong.

Well, at least we’re not suffering alone!

I think it’s possible- even likely that we’re doing something wrong. I just need someone to tell me what it is.

Hi! Sounds like you have to build a lightmap snapshot Unity - Manual: Lighting Data Asset. You do this by pressing the Build button in the Lighting window so your lighting can be loaded from that snapshot when you reload the scene.

1 Like

Huh… I was about to accuse you of accusing us of not actually clicking the build button.

But I decided to try something before making a fool of myself.

It looks like the Build button on the Lightmaps page is not the same as the Build button on the Scene page. Except it kinda is. But it isn’t.

At least, When I do the several hour long baking process from the Scene tab (or the Object page probably)- I lose the Lightmaps when I reload the scene. But if I kick off the same process (allegedly) from the Lightmaps page, it takes just as long… but it seems to be saving my lightmaps from scene load to scene load.

???

Well, it seems to be working. I’ve been rebaking all of my scenes and it seems to be working now.

Crossed fingers.

I am having the same problem all of a sudden. Not sure whats changed in my scene, but I spent most of yesterday baking lightmaps, for them to just vanish. I heard selecting build from the Lightmaps tab would create lightmaps and save the asset, which it did, different from clicking the build button from the lighting scene tab.

But still Lightmaps dissappear/vanish no matter what I do. I don’t quite understand why keeping lightmaps around is such a challenge all of a sudden. I change a light in my scene and have to wait for hours to re-build my lightmaps. Clear cache does no good, this is a now a real bother, thinking about using Unreal Engine, to see if that software is more stable and better.

I have spent a few bucks in the asset store to improve my Unity experience, who would have though it would be a built-in functionality that would screw things up.