We have a rather small project that used to build quite fast using Mono. Per Google’s request we had to switch to using IL2CPP and this situation has become quite problematic. We have bigger build sizes and the duration of builds are extremely long. I’m attaching images of our build and player settings. Perhaps we’re doing something wrong and someone can help us. We’re running Unity 2019.1.9f1 and using ndk 16.
If this was posted before my apologies. I did look at the Unity’s suggested improvements for making build times easier however I don’t think any of those suggestions apply in our case.
1 - I have no idea how we can make incremental builds. We’re not changing the directory or anything when we make builds it’s always the same directory for that matter. Is there a setting we need to tick to allow incremental builds?
2 - We don’t have an added malware or virus protection. We’re using Windows’ defender. I’m not sure if we have to do a special configuration for this. If so I don’t know what to do. Any ideas?
3 - And finally the project on my computer is on an SSD already. So that’s already done.
PS: Also Cloud Build takes a long time to build as well.
UPDATE 1:
I was able to cut the build time from 9 mins to 4 mins to 2:30 mins for Android on my Windows device. Lo and behold if I compressed the 120 icon sprites I had and turned their quality into a potato it gave me all the edge I was looking for in terms of speed. That is an enormous difference in build times just from textures, right? Now on the other hand the build speed for the cloud build is still stuck at 20 mins.
Now the other question is my build size jumped from 27 MB to 40 MB with the IL2CPP changes. Even if I cap my sprite sizes and compress them my build size is still 40 MB. This build size should be much less of course and when I upload this build to the Google Play Developer Console it complains to me about this and says I should use the app bundle system they have so I have to set that up independently from the issue here. (You can see on my build settings I haven’t been using app bundle.)
UPDATE 2:
Ok. Some more reporting on the situation. I setup the Android App Bundle through Google Play Store which took me about an hour because it requires you to set up private keys etc. using the command console and I had to learn some things I didn’t know like adding java path to your system environment variables. In the end the build time is still stuck at 2:30 mins which is good however, listen to this, the build time for the cloud halved! It went from ~22 mins to ~13 mins for Android.
The build size for the Android went from ~40MBs to 15MBs which is calculated after you put your app bundle on the Google Play Developer Console.
Hope this info helps. I’ll keep updating if there’s more.
PS: There was a very annoying situaton by the by with a new permission popping up in the Android build for Unity 2019.1.9f1. You can get rid of this permission by removing a plugin. If you google around you’ll find it.