Search Issue Tracker

Won't Fix

Votes

3

Found in

2017.3.0p3

Issue ID

997969

Regression

No

WebGL material loses transparency when loaded from assetbundle

Asset Bundles

-

To reproduce:
1. Open attached project and "Scene" in it
2. Play
3. You'll see a list of asset bundles, clicking once on them will load them into memory. So click on the asset bundles: "glas_materials" & "glas".
4. Click on the "glas" bundle again and it will open a new window to instantiate objects.
5. Load glas a prefab

Actual: Instantiate them and they will show up nontransparent.
Expected: Pull out Assets/3D/Glas A.prefab into scene - and notice it is blue-ish transparent

Reproduced in 2017.3.0f3, 2018.1.0b6

Comments (3)

  1. FairGamesProductions

    Apr 26, 2018 12:48

    Since no one has posted this, in case anyone else comes across this issue here is a work around:
    If you go over all the materials of the object and reapply the shader it should fix the issue:

    Material[] mats = instantiatedGameObject.GetComponent<Renderer>().materials;
    foreach (var m in mats)
    {
    m.shader = Shader.Find(m.shader.name);
    }

  2. FairGamesProductions

    Apr 26, 2018 12:24

    Metallic and Smoothness values seem to be ignored in materials from AssetBundles too.

  3. FairGamesProductions

    Apr 26, 2018 12:16

    Same issue here. Unity 2017.3.1f1
    All assets loaded from an asset bundle lose any kind of transparency functionality. Even manually setting the transparency to 0.0 does not change anything in the scene. This is happening with the Standard shader.
    Also, the secondary Albedo channels doesn't seem to work either. again on the standard shader. The textures are there but they are not being used by the materials.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.