So, I have some assets that I want to build as local, and some I want to build as remote, so the players can update some assets without updating the game itself (aka, the local assets).
However, I noticed that the hashes appended to the end of my local assets have changed, despite I didn’t change the assets themselves. It makes the game itself impossible to only update the remote asset, because the local assets will have different names from the remote catalog.
To give concrete example:
Suppose I have some local asset A, and remote asset B.
First time build:
Asset A has bundle named “A_hash1.bundle” and gets delivered with the game itself.
Asset B has bundle named “B_hash2.bundle” and is put on CDN to be downloaded later.
The player downloads the game, then downloads Bundle B. No problem.
Then, I changed Asset B without changing Asset A, and I built again.
Asset B now has bundle named “B_hash3.bundle” and is put on CDN, as expected.
But then, Asset A now has a different named bundle “A_hash4.bundle” on the remote catalog.
Since the game doesn’t have this asset locally, the loading failed.
Let me describe Asset A a bit further for more context.
Asset A contains some (100% certain) non-changing text files, and some prefabs with MonoBehaviours attached to it. These MonoBehaviours are derived from other parent classes.
So, my question is:
Since Asset A has prefab MonoBehaviours derived from other code, if I change some other code (not the MonoBehaviours themselves, and not the code they derived from. Literally some other code apart from them), are these MonoBehaviours considered changed too?
If I change the “Bundle Naming Mode” from “Append Hash to Filename” to “Filename,” since the hash isn’t appended anymore, can I potentially avoid this problem?
Hi, if the hash of a bundle changes, it means something changes. Maybe you need to know what is modifed in the assetbundle before trying other settings.
Hi Alan, thank you for the reply. Thank you for the link, it was really detailed and helpful.
It seems it is truly impossible to predict how local Addressables will change according to the forum link you posted, which is truly a shame and (I believe) contradicts the example usages of Addressables that Unity claims to support.
I guess workaround to this problem is to either:
Change everything assets to remote, which will work, but also creates overhead to both the user experience and also the cost of running the game.
Like you said, create the Addressables on our private machine. However, to me, it seems incredibly un-doable for indie developers.