Duplicate Things Addressables

I have 15 prefab at addressables and each of them has same sprites, same shaders same scripts. Are they duplicating size or not? Thank you. If this is fact how can I remove this duplication?

You can check for duplication using the “Analyze” window. You can find the window by going to Window > Asset Management > Addressables > Analyze. Then click the “Analyze Selected Rules” after highlighting the “Analyze Rules” text.

Basically if you have an asset in two or more asset bundles, it WILL be duplicated if the asset itself is NOT marked as an addressable. So to avoid the duplication, you must mark the individual assets as addressables also.

2 Likes

Thank You, I decreased size with this solution.

Is marking the invidual assets as addressables enough ? (and loading the addressable prefab will load the addressable sprite ?)

Or do I also have to manage the loading of the sprites (via AssetReference and everything) ?

Yes. Addressables manages all this under the hood, and this will prevent assets being duplicated come time to build groups.

Honestly you’ll end up with most of your assets as addressable but never reference them in an AssetReference.

2 Likes

Awesome !

This following post is making me puzzled : https://discussions.unity.com/t/798338/6

Anyway, I’ll make my own tests

EDIT : after testing, dependencies are handled as dreamt expected, even with direct references. I made a test where two prefabs in an Addressable group contained with the build were directly referencing materials and textures, which were in a remote Addressable group. The addressables had no issue loading the dependencies as expected on a Windows build and Editor hosted CDN. Really awesome !