How do we initiate an Android cloud build so that we use LZ4 rather than the default zip compression for our app? Obviously, this is just a checkbox when building locally, but not sure how to handle in cloud build. We do have a prebuild script that sets our bundle ID etc, so if it’s something we can just add to that then great.
Still wondering how this is possible. There is an EditorUserBuildSettings.SetCompressionType, but it’s an internal member, and it’s unclear if this would be passed through anyway based on other threads that say UCB only supports a sub-set of EditorUserBuildSettings.
I think this normally requires passing BuildOptions.CompressWithLz4 to BuildPipeline.BuildPlayer, which is not something we currently support. We are looking into ways to make that more flexible in the future though.
Great, thanks for clarifying. At least I now know it isn’t currently possible.
Did anything ever happen to make this a reality? We’re honestly quite surprised that there isn’t more demand for this, since LZ4 compression is a huge win in terms of install size, which in the modern world where everybody’s phones are too full to install a build that unzips into 600Mb of data (yeah, yeah, our apps include a lot of highly sparse data) can significantly affect install rates.
(iOS App Store now prominently lists the unzipped IPA size as the “App Size”, further reducing conversion.)
We’re still making all our retail builds outside of UCB, is there any chance we’ll soon be able to make them just the same as our archived UCB builds?
Bumpety bump bump.
This is now supported (under Config → Advanced Settings for each build target)
Ah, yes so it is if you make a new config.
Good work UCB team!
Note to other users looking for this: You will not see this option when editing your existing targets. You have to create a new target to see the options.
Unity: You can also mark this resolved if you like:
It should also appear on existing targets, the limitation it has is that it will only appear when building against Unity versions greater than 2017.1 and where the platform is Standalone, iOS or Android. If your existing target meets these criteria and you can’t set compression settings on it then it would be great if you could message me your project details so I can take a look at what’s causing that.
I was able to replicate this myself, there are issues with the logic that determines whether your Unity version is greater than 2017.1. Fix is in progress, for now you can set it up using a “latest Unity version X” version and then change the version afterwards - the comparison is failing against fixed versions e.g. “Unity 2017.2.1f1”
The fix for this was released today, you should now be able to enable compression options on any valid build target (Standalone, iOS or Android building against 2017.1+)
Look like in UCB compression for iOS is not working. With either compression set to None or LZ4 HC the build size is the same. @victorw could you please look into this?