- Home /
Unity 5 Freezes while building?
While building, when it gets to "Building assets for scene 0", Unity will freeze and stop responding and I will have to close it with task manager.
It plays fine in the editor and I don't have a lot of assets. What could be causing this?
Update: I reported the bug to Unity.
Update 2: They wrote back and said they were able to recreate the problem! It was caused by 'Branches_1.mat'. They will look into fixing it.
I have exactly the same problem! I would assume it's a bug that needs reporting.
I had this same problem (I couldn't even close it with task manager) but I found that if I try to build over top of an already present file (in my case if I try to build over an AP$$anonymous$$ with the same filename) it locks up my whole system.
Same for me, i've tried removing many objects in the first scene (scene 0), then the build passed the scene 0, but freezes again on another scene. I guess some assets might not be supported for some reason?...
Set it to go then cancel it (kill process). Set it to go again then walk away for 30 $$anonymous$$utes.
This was an answer given on another of the same question, which worked for them.
There must be a solution other than wait. Everything else I've built of similar size has finished within a $$anonymous$$ute. All i'm building is basically a few assets.
Answer by K0ndor · Mar 20, 2015 at 11:35 PM
I just stumbled upon this issue: fortunately, it succeded building after 3 minutes or so. But this is VERY long for almost empty project. So far only solution is to wait for builds to take their time and wait for new Unity update.
EDIT: I think I found THE ANSWER! Window > Lighting, just left from "Build" button there is "Continuous Baking" checkobx. Uncheck and voila! - no more "freezing".
thank you. this solution worked for me as well. my build froze for about 45 $$anonymous$$utes before i cancelled. did not see anything i could understand in the log files. turning off this lighting worked.
For me it worked too. Thanks..... But now I have nearly no sunlight :-( Last edit. I turned the lighting on again and now it doesn´t freeze I and have light!!
Im using.unity 5.3 i dont seem to have this button, i have a checkbox with the word auto next to it. Didnt fix the problem though
I'm having the same issue, however it doesn't appear to have anything to do with baked maps or lighting in general.
And it does entirely freeze (related to arguments in other posts). I left it for 20 $$anonymous$$utes, did some modeling, came back and it was still frozen. The thread says it's not responding and I'm unable to cancel the build. If I kill the process tree then relaunch unity and build it'll make it through.
For whatever reason if I build this scene for the first time after opening it, it freezes during building assets for scene 0. It's a new scene without any baked data. I have 40 some scenes across 3 different projects and this is the only one to behave as such.
Answer by $$anonymous$$ · Jan 13, 2016 at 03:41 AM
I dont care what some say on here about "it does not actually freeze. Yes it does and its not a "slow loading issue. It freezes and if you get the really awesome double down, it will freeze, then crash. When I have had that problem what I do is go into the folder for the game, make sure i have everything shut off, look for the part that says Library, and rip the library out and toss it in the trash and delete it off the computer, which in turn forces Unity to re-import and rebuild things.
Second, I have had nothing but problems with the automatic lighting settings ad have never seen this properly resolved. Under lighting I uncheck everything such as Baked, Automatic, whatever is checked there I uncheck. Then I hit build and things actually build in scene without all the overly problematic waiting for days to see if Unity has stopped smoking crack and actually built and finished building project for testing.
So try that, shut off unity completely, find the game folder, trash the library, restart and let it take its time re-importing the assets, etc, and shut off all the Light Maping things that are set by unity in default. Build and Run scene.
This saved me big time, thanks for the post Arch_Warlock!
Thanks for the tip! It indeed was a real struggle for hours to try and fix this... deleting the Library folder was the solution. Thanks!
I left $$anonymous$$e go at 100% cpu for 27 hours before I quit it. Usually compiles in 5 $$anonymous$$utes. No baking. No lighting etc enabled...
This was the only thing that worked 100% for me. Thank you for sharing your library deletion method!
Answer by Unicornaphobist · Mar 24, 2015 at 04:45 PM
I deleted 'Branches_1.mat' and removed the trees from my scene, and now it builds in less than 1 minute. This might not be everyone's problem but if you are using trees that could be it.
I will leave this question open though because other people are experiencing similar problems. If you do not have 'Branches_1.mat' in your project you should report the bug to Unity.
Has nothing to do with the trees. If you close Unity and then re-open it the "problem" will be back. See my answer below.
But after I did this it builds quickly the first time.
Well ,I have no trees in my scene and it happens to me every time I build for the first time.
Even in January 2019, this still applies, fixed my project after hours of trying to fix! Thank you! FYI: I deleted branches, then re-imported them.
Answer by alias · Jun 06, 2015 at 03:36 PM
I have had the same problem. building for android froze on asset 0.
when i deleted the speed tree and other prefabs and assets it worked without this problem
Answer by PsychoPsam · Dec 07, 2016 at 02:03 PM
I found that by deleting GraphicsSettings.asset in the Project Settings folder worked for me. Mine was locking up on globalgamemanagers.assets and never building. I remove that file, reloaded Unity and it worked fine.
that and deleting the library folder and opening the temp folder and deleting the lock file several times and turning of autogen lighting and switch to GLES3.0
and I am not really sure what actually fixed it but thanks everybody do it all seemed to work.
I just had that same problem with freezing when building and ins$$anonymous$$d of deleting GraphicSetting I looked in Edit -> Project Settings -> Graphics window. There was a missing shader in the list of Always included shaders. I removed that shader and then I could build. The porject was one that had been updated from earlier versions of Unity.
Your answer
Follow this Question
Related Questions
Unity 5 freezes while building? 0 Answers
How can I fix/stop my Unity from crashing when using the Unity inspector? 0 Answers
Unity randomly going unresponsive when importing script changes 0 Answers
Using Parse with Unity and the Parse Initialize Behavior is causing Android Device to crash 0 Answers
Changing scenes crashes the game 1 Answer