Use case: bundle variants with hd/sd textures

Issue #101 closed
Leonid Umanskiy created an issue

Hi, I am trying to solve a very simple use case:

  • Have prefabs with textures: "characters/vampire.prefab" references "character/vampire_texture.png"
  • Build bundle variants (HD, SD, LD) with different texture importer settings (max texture size = 2k, 1k, 512).

Do you plan on adding support for this use case?

Little more info: Built-in Unity bundle variant system requires you to have 3 copies of everything (prefab/textures/etc), simply for different texture max size setting. This is very hard to maintain and support.

It seems like this tool could solve such a simple use-case. However, I tried using and it had no luck so far:

  • Texture scaler node seems to create a new version of an asset and prefab reference is lost
  • I tried using Duplicate Asset node to copy whole "character" folder and then use texture importer update node to set max texture size.

However, this didn't work because asset references created by duplicator node don't have type and importer type info and it throws null ref.

Comments (3)

  1. Hiroki Omae

    While this issue is already closed (and sorry I have overlooked to respond this), I would like to point out that built-in Unity bundle variant system does not require you to have 3 copies of everything to reduce texture size. You can reuse prefab, material and you can only replace texture with variant system.

    Here is the graph I created to generate reduced texture using TextureScaler in AssetGraph 1.4, created AssetBundle of texture with 3 variants. Prefab and material is shared and have dependency to the texture that material is pointing (originally hd texture)

    ss2.png

    bundles.png

    result_1.png

    Sample Graph JSON

  2. Log in to comment