Search Unity

Bug Gltf with Asset bundles

Discussion in 'Web' started by D4rWiNS, Feb 1, 2024.

  1. D4rWiNS


    Feb 1, 2024
    Hi there!

    I have a webgl/mobile/standalone project that loads asset bundles from a remote server. I am using Gltf models in the project and using GLTFast to load them.

    When I made the asset bundles from the prefabs, it works perfectly on mobile and standalone but in webgl it seems that it is not compiling the material correctly. (It is only showing the shadow in the build and throwing errors in the shader


    If I load the webgl asset bundle from the editor and I assign the same shader to the material, then it loads correctly. I can see that there is a difference in the material inspector from the incorrect shader vs correct shader

    Incorrect shader:


    Correct shader before build them into asset bundles:


    I think that Asset bundle is not building the correct shader.

    Any guidance or workaround will be appreciated