3

It always stuck at IL2CPP for more than 10 minutes. why and how to speed up the process? I have tried the examples found such as exporting to the same folder.

learning
  • 59
  • 1
  • 8
  • Depending on the complexity of the project of course .. but 10+ minutes is very "normal" for Unity. Yes building to the same folder at least makes IL2CPP only rebuild the necessary files and should give it a boost of at least half the build time .. however .. if you want to build faster the only real solution is: Use a stronger PC for the build process. – derHugo Oct 01 '19 at 07:01
  • Unity builds are slow, it also depends on the machine.. I have a simple scene that at home took 5 minutes at work took 5 hours.. – BugFinder Oct 01 '19 at 07:48
  • Sighh...my laptop is for work so it is not going to be "stronger" anytime soon. Only can hope someone at unity finds a way to optimize it. Thanks, guys – learning Oct 01 '19 at 09:26

2 Answers2

5

The WebGL build toolchain involves a number of different tools, so the build time can take a while (we're working to improve build times with IL2CPP and related toolchains now). There are a few general tips which can help improve build times here:

https://docs.unity3d.com/Manual/IL2CPP-OptimizingBuildTimes.html

Most of the build time will be spent on disk I/O in many cases, so making that as fast as possible is likely your best option.

Josh Peterson
  • 2,299
  • 19
  • 21
  • "Exclude project and target build folders from anti-malware software scans", do I really need to disable my anti-virus before building my project? Or I just need to exclude the unity folder in my anit-virus? because I tried that and it is still slow – learning Oct 02 '19 at 02:07
  • Excluding the Unity project folder should be enough to make the build faster. It still will probably take a long time, as the WebGL build toolchain has many steps. – Josh Peterson Oct 02 '19 at 15:03
0

This is true for software development in general, but I wanted to make it clear that you are NOT limited by your hardware nowadays. I recently transitioned my game to Gitlab and set up a full CICD flow based on this really cool open-source project. Every change I make automatically gets built in the cloud (on powerful computers that I didn't buy and don't pay for), and I can download the completed build when it is done.

If you have a spare computer in the house, you can use that as a build server instead (via Gitlab, Jenkins, or file sharing and manual compilation)

Finally, by making full use of the playmode editor and the profiler, you can minimize the number of times that you really need to be building in the first place. If you complete a full WebGl build only to discover that a bug makes the game unplayable, you should treat it as a failure in your process. 9 times out of 10, you could have found the bug through some other means (unit testing, playmode testing, etc.) without the need to build and deploy your full project. There are exceptions here, WebGl accesses files uniquely, so a Windows build might work where a WebGl build fails, for example.

Software takes time to build in general, and I don't think Unity is particularly bad when compared to other projects I've worked on. It can be frustrating when you have to wait for your build to finish in order to know if things are really working as you expected, but you shouldn't ever have to walk away from your computer because it is busy compiling when you would rather be working. There are many tools and solutions that can enable you to keep working even when your build times pass the one hour mark!

SdgGames
  • 40
  • 4