I need to build my game with a variant asset
for example, I need a green blood splatter asset for a build.
is there anyway to do that with Addressables?
I checked the samples, there is texture variant sample, but it only handles the same texture file but with different import setting
which technically is still the same asset, but with different import setting
I need to use different asset but same asset reference
Various solutions depends on your demand.
If reference asset using address (string), you can just mix address and label as a trivial solution to achieve variant (even on runtime switching).
You can optional build and load custom catalog, if you think put all variants into one big catalog is not acceptable. But it requires more knowledge about the system.
If reference asset using AssetReference* object, it can be tricky. AssetReference located asset using guid, in your case different texture files have different guids. Iām sure a hacky provider can swap the guid to correct variant underlying, but seems too complex. Other folks may have better solution I guess.
1 Like