Hello, I'm planning the DLC system for our next game. We'd like to be able to distribute new levels after the game is released. Unfortunately I am unable to conceive of how one might do this with the systems Unity provides. I'm hoping someone can address my lack of understanding. Initially AssetBundles seemed like the 'correct' way to do level DLC. AssetBundles let us download an individual level file after the player has purchased it, but the need to include all the dependencies limits the number of levels we can practically distribute. This system seems more suited to additional weapons or outfits. Investigating Addressables seemed promising, as it circumvented the issue of bundles not being able to leverage common assets in the game. This gives us the desired small level files, leveraging common assets, but with the limited API there is no apparent way to gate specific content, or tell if an addressable is local or remote, of how much of it is downloaded. I'd like to be able to present of list of levels available to the user, and clearly indicate if they are ready to play, but the addressables seem to 'automagically' hide those details. Is my understanding of these systems correct? Is there a 'correct' way to do DLC for levels? Thanks
Addressables are built on top of asset bundles. Either will do what you need, as you can bundle the common dependencies of your levels onto a separate asset bundle.
I'd love to see a sample of how you can detect that an Addressable package has been cached and is available locally.
As already mentioned, Addressalbes or AssetBundles can be used to pull dependencies out of bundles such that you either ship with common assets, or have them as their own unique download. As to the issue of knowing which levels are "available", we don't have an immediate solution to that just yet. I'd recommend keeping a list of "played" levels. Seed that with the ones you know are local, then as a user selects a remote one, and you download it, add it to the list. We have on our to-do to add some kind of "IsReady/Local/Cached/Something" but haven't gotten to it yet.
So, the way to ensure everything is downloaded/cached is by using Addressables.DownloadDependenciesAsync(...). This will download anything that isn't already cached. If it is already cached then the operation should complete synchronously and you can continue with your load/instantiation. If there are problems with this pattern let us know and we'll see what we can work out to help.