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 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”.
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.
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.
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
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.
It doesn’t actually freeze. Just wait and the build will finish after a few minutes (depending on the size of the build).
This only seems to happen during the first build after unity starts. The following builds (until you close Unity) will be much faster.
After you remove the whole folder with trees just reimport it and it works fine
Had the same problem: Endless pause, All CPU Cores maxed for long time on “Building assets for scene 0”
Fixed the problem by ajusting the permissions on the folder structure on the new disk where I started creating new projects because default perms where to restrictive on this Windows machine.
Hope this helps
I figure this out tonight. It only happens on FLAT terrains. Put a small mountain on your terrain and the lighting won’t hang anymore.
Found a solution that worked for me. Go to Window → lighting → uncheck Auto (building)
I’m having the same problem on 5.5.0f3 … but can’t seem to locate whats causing it. I removed my shaders and all lights… even delete the library folder.
If it helps someone : after updating to oculus SDK 1.12 & avatar SDK 1.12, I had to go to the graphic settings and remove the 3 custom shaders from oculus I had to put there as previous fix for their broken shader system to solve my freeze issue here.
I have been having this issue to and mine was as simple as under PlayerSettings → Other Settings → Logging I had originally changed my logging from ScriptOnly to Full and once I set it all back to ScriptOnly it didn’t hang and compiled fine.
All you need to do is remove all the shader assets and make sure all your lighting has no bake or automatic settings. Some of the tree standard assets have problems too.