Assetbundle Variants with dynamic content

Hey guys,

I’ve been experimenting with assetbundle variants the last few days, and I’m running out of idea’s to solve my problem. What I have is a project that loads all it content from assetbundles on startup and with that sets up the scene. The project should run on a lot of different devices, so a HD and SD version of my assetbundles would be a great help. Assetbundle variants seem to be the best tools to help me do that.

But as I said, I’m running into problems. I can already built assetbundles and their variants from code now, thats not the problem. The thing is that in unity itself, the assets in my SD bundle are still references assets (like materials or textures) in the HD bundle. It was my understanding that when you only load the SD variant, it would recognize the fact that HD is not available and search for the same asset in the SD bundle. That’s not happening. It still fetches the assets from the HD bundle, rendering my use of the variants useless.

The demo’s provided by Unity themselves show only static content using variants (the scene with already a tank in it). I cant find any other examples online about assetbundle variants, let alone in combination with dynamic content.

So my question to you guys is; Is it even possible? Can I do what I’m describing in this post, and if so how. I added some screenshots to show my project setup.

Hi,
I am currently experimenting with the asset bundle variation feature! However I am struggling also with this functionality! Unfortunately I did not find any good tutorials with simple examples!

Did you get any further with your experiments? As example I wanted to exchange the materials with variants of an asset bundle!

Thank you for your feedback

Best regards

Hi,

A bit late but for whoever needs it I found this example that shows how to use asset bundle variants so that the scene uses the correct assets: https://unitylist.com/p/6uj/Unity-Asset-Bundle-Variants-Example
The key seems to put the scene in an asset bundle and load it with all the bundles instead of keeping the scene in the build settings. This way the scene seems to know where to find the assets in the bundles, and also the asset referenced by the scene will not be included in the build which is also the objective of this.

1 Like