Unity-Technologies / AssetGraph

Visual Workflow Automation Tool for Unity.
Other
1.12k stars 208 forks source link

Use case: bundle variants with hd/sd textures #136

Closed hiroki-o closed 6 years ago

hiroki-o commented 6 years ago

Original report by Leonid Umanskiy (Bitbucket: [Leonid Umanskiy](https://bitbucket.org/Leonid Umanskiy), ).


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

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:

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.

hiroki-o commented 6 years ago

Original comment by Hiroki Omae (Bitbucket: [Hiroki Omae](https://bitbucket.org/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