How would I offer the user the option to skip an addressable download when I do Addressables.Load?
Another way of phrasing it, how do I load an asset without doing update checks on it?
I need an update check method, a load method and a download method. Them all being shoved into Addressables.Load makes it really hard to work with.
Seems like it may be possible to ignore downloading the new content catalog on start… which would make it where they cannot update anything in that session.
But what I need is when they select a level to chose whether or not they want that specific level to be updated. It is trivially easy to do it with asset bundles, but seems not doable with addressables?
EDIT
Just found this Custom operations | Addressables | 1.16.19
Is this how we are intended on doing it? If so great, but would be nice if it was an already available thing to do.
I don’t think it’s possible to tell addressable to load specific bundle version.
I had a similar need and in the end I forced to write a complex hack that work with addressable but adds a version to name of some defined assets so I can load specific asset version.
if I understand correctly you can use a similar approach, each file has a version in it’s name and for new version create a another asset with deferent name so you can choose which asset to load.
it’s not very clean solution and need a lot of automation to give you a simple tool to manage your assets and doesn’t cause complex build pipeline or messing up your project asset database.
some of addressable option will help you to prevent addressable from redownloading content (even if they change) like disabling CRC check and setting bundle naming mode to “File Name” instead of “Append Hash to file name”
problem is when you ignore CRC check and change bundle naming there is no other way to let addressable recognize a bundle is changed and if a player download a bundle it will stuck like that and won’t update anymore.
Yeah, I have thought of these approaches. But that’s such an ugly workaround.
I am going to try to extend IResourceLocator to just not do the downloading and only attempt to load and see if that works.
If any devs read this, please split the Load method up to have separate Download and Load methods. There are lots of situations where a user may not want to be forced to download an update to their graphics.
1 Like
Does anyone know if it would be possible to extend the custom operations to ignore the update process?
https://docs.unity3d.com/Packages/com.unity.addressables@1.16/manual/AddressableAssetsCustomOperation.html#creating-custom-operations
It seems doable but I, unfortunately, don’t understand the process for how this would work.
The company I work for wants to give users an option to skip downloads when going into a map.
So I just need to see if any version of a file exists (preferably any version after a certain date) and if so, just laod the scene from that bundle and skip the update/download process.
After more thinking, I see why this isn’t offered.
You can not guarantee the dependencies between builds.
Will just go the route of per session updating by pulling or not pulling the newest content catalog