Hi, just a quick question - I have just started learning Unity with the udemy course Ultimate Guide to Game Dev (hobby purpose), everything is going ok but I notice the compile time for when I update a c# script can take 10 - 15 seconds before it runs, is this normal ? I come from a web development background and when I do a change to a script it’s instant. I’m just curious as when the c# scripts become larger in scale is the wait time even longer.
Web programming is not pre-compiled, it’s interpreted, which makes it slower. Compiling makes stuff run faster, at the cost of having to wait for the compilation. However, 10-15 seconds seems excessive unless you have a lot of scripts, or else your CPU is very slow. I usually get 3-4 second compile times with thousands of lines of code.
I get 10+ seconds with my mid sized project and no assembly def files. That’s pretty long for a minimal project, but no idea what hardware you are working with, or whatever else you are running in the background. SSD storage and more CPU resources generally speed up the process.
I thought having 3rd party .dlls in your project can significantly increase the compile time.
I can compile just my code in about 2 seconds, but once I import a certain assets from the asset store, the compile time goes to 15 seconds.
Compile times depend on how big your project is, and how fast your PC is. Adding more assets increases your project size, thus increasing compile times.