Search Unity

Bug Gltf with Asset bundles

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

  1. D4rWiNS

    D4rWiNS

    Joined:
    Feb 1, 2024
    Posts:
    1
    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

    upload_2024-2-1_11-4-23.png

    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:

    upload_2024-2-1_11-6-6.png


    Correct shader before build them into asset bundles:

    upload_2024-2-1_11-6-40.png


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

    Any guidance or workaround will be appreciated

    Regards