Hi.
I have an addressable asset that contains a prefab reference. So the prefab also becomes addressable. Not only the prefab but also all its children become addressable.
So what is wrong? The problem arises when I use the prefab’s children in many other assets. So the process is: addressable loads the prefab and all its children, One of its children is a scriptable object and I have referenced them in other assets. now I have 2 scriptable objects of the same asset. one has been loaded by the addressable and the other that has been used in other places.
so the problem is the values of the NOT-addressable scriptable objects change but the addressable one doesn’t change.
When you have the same asset both referenced by an addressable (but not addressable itself), and referenced by something not in addressables, those assets will be duplicated come build time. This isn’t an addressables thing, but an Asset Bundles thing (with addressables being a wrapper around asset bundles).
Simple solution is to make sure any SO’s that you use to communicate/store data are either only used in addressables (and also addressable themselves), or only used not in addressables, to make sure they aren’t duplicated come build time. That way when any addressable referencing the SO is loaded, it’s always pointing to the same SO.
You can see where assets are being duplicated by using the Addressables analyze window, and I pretty much put 100% of my assets into addressables to prevent this being an issue.