29
votes

I've been building an Android app on Unity with 3 scenes. The first 2 scenes work perfectly but the last scene was giving me trouble. The game kept crashing on that scene

So while checking out the Unity Forums, they suggested that I copy paste all objects onto a new scene and try and see if it works.

But now that I've done that, I'm not even able to export it. While building player, my loader gets stuck on this: Building Scene 2: Name (10/15 Bake Runtime | 1 jobs)

I've not changed anything else in the settings, and if I remove the 3rd scene, it builds normally. When I only add the 3rd scene it gets stuck on the same.

What could be the problem? enter image description hereenter image description here

4
If you're talking about Lightmapping, then I don't use any such thing. The only thing I do use is Directional Lights. Would you like to see Directional Light settings?Augmented Jacob
In Unity 5 lighting settings include not only baking lightmaps, but also precomputing realtime lighting, light propagation and other elements used by the Physically Based Shading. I'm not sure that's the source of your problem, but I had problems with the build process when I set too high quality settings in the lighting window. If you are sure that is not the cause of your problems, then there is no need to post screenshots :) I hope someone else will track down your issue.K.L.
No no, I'm a noob lol. Please tell me where these light settings are? Build Settings? Or somewhere else?Augmented Jacob
Lighting screens are up. Please check them out?Augmented Jacob

4 Answers

3
votes

clear your GI cache from the Edit > preferences menu , i had a similar issue and doing so fixed it if you can't clear the GI cache go to Lightning window and uncheck the auto build checkmark close unity and open again ...

1
votes

There is no information about what unity version you are using, but in Unity 5.1 changelog it is said that they removed crashed from lightmap baking:

Lightmapping: Fixed race condition crash in lightmap bake when converting .exr files.

If anyone is still experiencing this crash, maybe it would be nice considering Unity update? It could be your case.

0
votes

This version of Unity is now outdated and I believe the newer versions of Unity do not have this problem.

0
votes

The GI cache is used by the Global Illumination system to store intermediate files when precomputing real-time GI, and when baking Static Lightmaps, Light Probes and Reflection Probes. The cache is shared between all Unity projects on the computer, so projects with the same content and same version of the lighting system (Enlighten) can share the files and speed up subsequent builds.

But sometimes GI cache files cause serious problems for performance. If so, you should automatically clean GI cache files in Unity Preferences using a button:

enter image description here

P.S. It is not safe to delete the GI Cache directory manually while the Editor is running. This is because the Editor creates the GiCache folder when it starts and maintains a set of references to those files. The Clean Cache button ensures that the Editor releases all references to the files on disk before they are deleted.