WebGL builds no longer function after upgrading to unity 6000.0.32f

I recently upgraded my project from Unity 2021 to Unity 6000 and I’ve completely lost the ability to build to WebGL now. It was kind of working before using a workaround I’ve seen others use, but now that workaround has stopped working.

When making a build, the building process locks up on “linking build.js (wasm)” and will stay on that screen endlessly. I found one trick that suggested cancelling the build and then redoing it, and that worked a couple times, but now when I cancel the build it just stays on the “cancelling” screen forever. Like, even leaving it on overnight didn’t finish the cancelling process. I have to force close unity through the task manager.

I’ve tried deleting the Library folder to reimport everything and this doesn’t fix it. I’ve tried uninstalling and reinstalling Unity 6000.0.32f and that didn’t change anything either. Has anyone found a fix for this?

how long did you leave it? it does take a rediculous amount of time.

Start if off, go to bed…

1 Like

Agree, a web build can sometimes take hours (!) to complete, depending on the system and the complexity of the project and build settings. If you have one of those “LTO” (link-time optimization) build settings enabled, this can take an absurd amount of time and it would be “stuck” in that very linking step.

Be sure to create a development build (checkbox in build settings) and set all Player Settings to favor fast(er) build times first. When you can successfully create a build that way, you can more confidently create a release build with optimizations enabled.

Hum same issue here ! We upgraded from Unity 6000.0.27 to Unity 6000.0.32 and now the step ‘Linking build.js (wasm)’ is now taking too much time.
(It should take only 2 minutes for our project). Seems that there is a very recent regression.

Will try each version between 0.27 and 0.32

EDIT : No infinite linking step with Unity 6000.0.31

Just checked with a rather simple project and there the upgrade to 6000.0.32f1 didn’t cause any troubles (github action). So I guess the problem is either that it just takes too long (as suggested by others) or there is a linking issue when the project becomes more complex.

Web builds can definitely take some time, especially with build settings optimized for authoring. As @CodeSmile said, you can usually speed things up by setting File>Build Profiles>Code Optimization to “Shorter Build Time” or really anything non-LTO, although LTO will get you gains likely worthwhile at authoring time.

One extra detail here is we’ve noticed enabling LTO can run through the build machine’s memory in some configurations resulting in exponentially longer build times. Our theory is that’s causing the machine to repeatedly swap out page files, and thrash while trying to optimize - we’re currently looking into understanding exactly what’s going on and what we can do to mitigate memory use in those cases.

Assuming you’ve already tried that, if you share the Build Profile and Player Settings you’re using we might have further suggestions. Let me know if that’s helpful!

unity 6.0.33f
this is embarassing… the downgrade is real, i went from 15 min max to this, and i have ridicolous pc… i mean Amd Ryzen 9 7950X , 32gb ram ddr5

hehe, the first build is brutal, i mean screw it go to bed brutal…

i tought it was only the first one, like usual, but no, unity 6.0.33f is so broken i have to endure 1.5h of build time for webgl every single time, please can someon of the engineer can take a look at it ?

every time? wow, mine was only ever the first

update : im still having huge ( literally huge build times ) with this project we migrated from unity 2021 to unity 6.0.33f, weirdest part is that my colleague can build just fine, while me on both my machines i have >1h built times