Hi, I would like to have a small-ish app on the play store. I plan on reducing the size of the app as much as possible and then removing some parts from it that the user will have to manually download from my server once he starts the app (it doesn’t have to be my server). Now, I’m not looking for an answer on how to do this and since it’s going to take ages to write out, I’m looking for an answer that’s just going to push me in the right direction as I don’t really know what to search for.
A good example of this is the new Nordeus mobile game “Heroic - Magic Duel”. They will let you download the .apk as a very small file with very low-quality images. Therefore their .apk size in the play store remains small and they get certain benefits from that. Then, once you start the app they will download HQ textures in the background. I’m looking for something similar. So any links to guides/tutorials/courses will be of major help, thanks!
Not really… initial implementation should be fairly straightforward. Asset Bundles (and probably the newer Addressable Assets) are pretty simple to work with. You mark assets to go in the Asset Bundle, make the bundle for the desired target, put it up on a server (a local server on your machine works fine), then write a simple downloader with UnityWebRequest to get the AssetBundle at runtime. Now you can use the Asset Bundle API to get at its contents and do whatever you need.
The real difficulty will come in managing it and deciding what to put in the AB, what to keep local, how to manage multiple Asset Bundles, etc. But definitely start simple otherwise you will not have enough knowledge of how it all works to make good choices as far as a complicated setup, at least until you do some simple setups.
I haven’t looked at Addressables yet, but Asset Bundles are just for assets. Can’t include code. You have to include all code for the whole project in the original APK.
Yes, this is an important often-overlooked point. Code must be compiled and signed into the binary build, not delivered via asset bundle.
The exception would be if you implement a true text-driven scripting language such as LUA. Opinions vary as to whether this technically falls afoul of Apple/Google EULAs regarding unsigned code, since it’s not really executable code but rather interpreted and run by the signed code in your game.