Search Unity

inbuiltshaders breaks on WebGL - Fixed by disabling inbuiltshaders build step.

Discussion in 'Addressables' started by Dabeh, Apr 25, 2019.

  1. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    Hey,

    I had an issue where inbuilt shaders will break with an error about being unable to be decompressed
    Code (JavaScript):
    1. Decompressing this format (1) is not supported on this platform
    I've fixed this by..not fixing it. I disabled the build process where it includes inbuilt shaders. This fixed my issue, but ofcourse, it's just a workaround although I haven't seen any major issues (Probably because it's just a 2D game and I have my shaders pre-loaded, so my use-case is not breaking this) - maybe this is building with the wrong compression by default? All my own bundles use LZ4 and worked fine once this was disabled.
     
    Beardshaker likes this.
  2. Initive

    Initive

    Joined:
    Jan 26, 2013
    Posts:
    10
    I'm getting this problem too. How do you disabled the build process where it includes inbuilt shaders?
     
  3. Dabeh

    Dabeh

    Joined:
    Oct 26, 2011
    Posts:
    1,614
    If you go to your DataBuilders, under Assets/AddressableAssetsData, edit the script for BuildScriptPackedMode, at line 493, just comment it out, clear your cache, rebuild. It should be okay now. Just make sure to include any shader that isn't showing up in the Always Included Shaders.

    This SHOULD work. Should being the keyword ;).
     
  4. Initive

    Initive

    Joined:
    Jan 26, 2013
    Posts:
    10
    Thanks, the other bundles load now but I’m having a hard time getting the LWRP shaders to always be included so I’ll just stick to 0.6.8 for now.
     
  5. Beardshaker

    Beardshaker

    Joined:
    Nov 3, 2014
    Posts:
    4
    This issue is still present in Adressables 1.1.5, tested with Unity 2019.1.12f.
    Has anybody already submitted a bug report on this?
     
  6. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    Beardshaker likes this.
  7. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    the built in shaders bundle was being compressed in a default way, which didn't work on webGL. As of 1.1.7, it will read compression settings from the default group. So be sure to set that to something compatible, and you'll be fine