#Addressables Per Platform

1 messages · Page 1 of 1 (latest)

frail fog
#

While we are able to customize the building of addressables per platform, it is really far from ideal when it comes with platform dependent needs.

What is suggested it to duplicate object and change the duplicate object with the platform needs. (Removing Script, Removing GameObject, changing reference, etc.). It does work in most case, however it requires you to know every place that reference the said assets OR that you make the change inside the assets. Concretely, it translate to the needs to change every asset that points towards the one you actually want to change.

By example, if you wanted to replace a material by an other, you either needs to change the material itself before building or change every place that reference the material you want to replace.

If we had something similar to the Asset Bundle Variant, I believe we could simply have two bundle with the same mapping (id/element) and include/build the one we want. Removing the needs to change potentially a lot of assets or change the assets specifically for the build.

eternal jackal
#

Hi @frail fog , I'll see if we're able to get an addressables expert in on this as it's very much tied in to best practices (or potentially a feature request) on that side

eternal jackal
#

@frail fog I've asked the Addressables team for advice here, and for now their general guidance is to use Labels --> https://docs.unity3d.com/Packages/com.unity.addressables@2.3/manual/Labels.html

  • You can use one or more labels as keys to identify which assets to load at runtime.
  • You can pack assets in a group into AssetBundles based on their assigned labels.
  • You can use labels in the filter box of the Groups window to help find labeled assets*

Would that work for you?

In the meantime, I did forward your general feedback on usability so that's gone to the Technical Product Manager. They are working to improve the use of addressables for multi-platform usecases

frail fog
# eternal jackal <@208422197348401152> I've asked the Addressables team for advice here, and for ...

Unfortunately, it does not solves the issue I'm facing.

  • You can use one or more labels as keys to identify which assets to load at runtime. (The case I'm speaking of is whenever we do not load assets manually)
  • You can pack assets in a group into AssetBundles based on their assigned labels. (It does not helps with replacing an asset with another)
  • You can use labels in the filter box of the Groups window to help find labeled assets. (Finding asset is not with what I have trouble with)

Also, it is worth mentioning that it is not that I am unable to have what I want, is that doing it is a lot of trouble while I believe there should be easier alternative.

eternal jackal
#

OK. Whilst the feedback has been given to the Addressables team, the best way to make this a more prominent request is for you to provide your ideal solution or usecase/workflow so that we can evaluate that during the improvements they're making.

midnight sedge
eternal jackal
frail fog
#

Use case:

  • Facilitate the variation of content base on X conditions (platform or #define). (Notably for assets that are not loaded through Addressables API)

Ideal Solution:

  • Ability to bundle two pack of assets that are interchangeable. (Similar to the Asset Bundle Variant).

Note:

  • There is already ways of doing it, but they are less efficient. They either requires to use the Addressables API directly, change the object base on the conditions at build time or change all references to the given object for its variant.