How would I setup a Skippable update scenario with adressables

Hi,

I’m experimenting with Addressables for a project in which I used AssetBundles. The thing is that I load scenes that can get really big and I want the user to be able to skip downloading (when other versions of the content is available) the content and when he/she does this it uses the bundles from the cache.

So (in short), the flow of the application is:

  • Application checks for updates

  • User gets prompted if he/she wants to download the updates (preferably a list of specific addressables)

  • => User updates

  • New content is downloaded

  • => User skips updates

  • content is loaded from cache

  • Application continues

Can anyone help me out in how I would do this with adressables?

P.S. While looking for answers for this on stack-overflow and the Unity forums, I came across a lot of similar questions. I think with this use case it holds a lot of aspects that could serve as a code sample for a lot of users. Just Saying :slight_smile:

Bump!

Nobody else has this usecase? Am I using addressables in a way they’re not supposed to be used? If so, let me know!

Thanks again!

That’s an use case others have too (me included ^^). As far as I can tell you, the catalogue updating is the interesting thing here, as it includes all needed info for downloading all addressables inside that catalogue.

So, basically you need to check if there is an update for the catalogue. If so, then ask the user if he likes to get the update for the catalogue and the addressable assets. If not (and now comes the tricky point), keep the old catalogue.

Does that help you a bit?

Maybe a bit, but i’m still not really closer to getting a skippable update functionality.

Hope someone of the Unity officials can help! Would you know if (or who) I can tag them?

1 Like
  Addressables.LoadContentCatalogAsync("catalogPath").Completed += handle =>
            {
                var downhandle = Addressables.GetDownloadSizeAsync(handle.Result.Keys.ToList());

                downhandle.Completed += operationHandle =>
                {

                    if (operationHandle.Result > 0) //downhandle size
                    {
                        if ("User skips updates")
                        {
                            //Remove the remote key
                            Addressables.RemoveResourceLocator(handle.Result);
                        }
                        else //User updates
                        {
                            //No code processing required
                        }
                    }
                };
            };

You can try the code above, I haven’t tested it.
The general process is: if the user skips the update, use the old key to load.

`
Hi thanks for your reply! I had the exact same code working except for using the Addressables.RemoveResourcelocator. could you elaborate on what this does?

Also how would I load the already existing/local catalog so i can check if any addressables are present on the system?

Whatever I do it doesn’t look like remote Catalogs are stored on the system either, so it tries to get that on every app launch.

Last but not leas, when getting the remoteCatalog it sometimes says that there aren’t any updates (which is true in my case) but the downloadSizeAsync will still give me a value > 0.

All in all, it looks like it’s just not ment for this purpose. I hope someone of the unity team reads this and helps out