简体   繁体   中英

How to improve build times on unity?

I remember vaguely that i once saw an article about improving build times with the use of assembly files being built separatly and something about namespaces dividing the project to parts that will be compiled separatly.
again some about ASM files.

I can't find it anywhere. anyone know?
Build times are killing my pace, i need to speed up.
any help will be appreciated

Although you said build times. As you mentioned assembly definitions I will assume that you are referring to compile time and domain reload time.

Depending on your project Unity can generate up to 4 different assemblies for you. By dividing up your codebase into custom assemblies and not relying on the assemblies to be generated by Unity you can decrease the amount of code needed to recompile through incremental compilation. However this will not reduce domain reload time which is the usual culprit for high "compile times".

In order to reduce your domain reload time it is best to check what is causing your high domain reload times with the Editor Iteration Profiler . You can also start having a look at scripts that use InitializeOnLoad since that also gets called every time the domain is reloaded.

Some resources that expand upon what I mentioned:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM