Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Streaming in textures with asset bundle variants

Discussion in 'Asset Bundles' started by omacha, May 29, 2020.

  1. omacha

    omacha

    Joined:
    Aug 21, 2017
    Posts:
    9
    Hey everyone,

    My current setup is like this: in WebGL, I load a scene from asset bundle with all its dependencies (each object has its own asset bundle), but the loading takes time because together, the data is about 100MB.

    I was wondering if it was possible to replace an existing texture in the scene using asset bundle variants. I load a low resolution texture, start the scene faster (smaller file size), and then asynchronously load the higher resolution variant of the texture and replace it in the scene.

    From what I understand, I would have to replace the materials on the meshes as the asset bundles don't handle this automatically. Would there be a trick to replace the texture in memory directly, or do I have to replace the material necessarily?

    Using Unity 2019.1, but I am open to upgrade if there is a new feature available in later versions. I'm also open to Adressables if these can handle this case.