Android Build Times - Unity 2018.2

I have a fairly large Unity project that we are now porting to Android. I am trying to setup our project for maximum iteration time, since we have to do a lot of on-device testing for performance. I’ve noticed that the build times are very long even for a single scene - compiling shader variants, building IL2CPP, packaging, etc.

What are some ways that I can reduce this time? In particular, why does it compile shader variants every time I build rather than caching them?

I’ve noticed that symbol files are always generated as well. Is that slowing down my build time? Can I remove this?

Hi!
If the shaders don’t change, they should be read from the cache, not recompiled. It will still say “compiling”, but that doesn’t mean the compilation is actually happening.
If you want faster iteration times, you could also switch to mono, it builds much faster.

2 Likes

Switching to mono definitely helps, so thanks for that tip.

On the shaders - it’s taking 15 minutes to “compile” the shaders each time (or at least it says compiling). Is that normal?

Well, it depends on how many variants you have, how fast is your storage, etc.
But if you don’t change anything related to shaders, then I’d say it doesn’t sound normal to me.
If it’s the latter, can you please submit a bug report?