Search Unity

WebGL and addressable scenes

Discussion in 'Addressables' started by Splint-L, Oct 15, 2018.

  1. Splint-L

    Splint-L

    Joined:
    Feb 6, 2018
    Posts:
    3
    We have been unable to Instantiate scenes using addressables.

    Everything else we have tried seems to work. But scenes seem like it's a no go currently.

    We are using 0.3.5-preview with Unity 2018.2.11f1.

    Are we doing something wrong or is this a known bug?
     
    MNNoxMortem and Twyker_gp like this.
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    We will add it to the bug list to look into. It is not known, but we have thus far been focusing our efforts on mobile support. Based on the number of mentions on this forum, it sounds like WebGL would be the platform for us to stabilize after mobile.
     
    MNNoxMortem likes this.
  3. Splint-L

    Splint-L

    Joined:
    Feb 6, 2018
    Posts:
    3
    Thanks Bill

    We just tried it with version 0.5.2 preview yesterday, and there is progress, but it still not fully working. Our scene now instantiates and the only issue now remaining seems to be the baked lightmapping not being shown correctly. So there is progress but it's still not quite there for WebGL.
     
    MNNoxMortem likes this.
  4. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for the update.
     
  5. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @Splint-L , @unity_bill we run into the same problems with baked lighting (which is the only GI available in WebGL).
     
  6. LynxVision

    LynxVision

    Joined:
    Aug 18, 2012
    Posts:
    7
    has there been any progress with addressables in webGL?
    we are also having problems getting to substantiate addressable assets in webGL...
     
  7. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Which version of the editor are you using? There are lighting issues in the engine that we are working to fix. If you use the latest 2019.1 beta, or 2019.2 alpha, they should be fixed. We are working to get them back to 2018.3, but the fix is not in yet.

    Not sure if this is the same problem, but it sounds like it.

    -Bill
     
    MNNoxMortem likes this.
  8. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    I'm also having problems - same example works in a windows build, but not with WebGL: gives error about not being able to decompress type 1 (LZMA) even though I've tried to put everything to use L4Z. We've used assetbundles via the old asset bundle systems earlier happily.

    Is anyone able to load Addressables in WebGL?

    Updated to 2019.1.5f1 to test this but got that same error as with 2018.3.

    Was thinking of putting my minimal test project to github for an error report, but maybe better to try with the already existing sample scenes that Unity folks have.
     
    BFS-Kyle likes this.
  9. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    Having similar decompression problems as well.
    We're on Unity 2018.4.1f1 and version 0.8.6-preview.

    It runs the scene somewhat, just with a lot of missing textures and error spam.
     
  10. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    @unity_bill As an update, I believe this can be fixed by setting the BundleCompression in the constructor of AddressableAssetsBundleBuildParameters.cs to set BundleCompression = BuildCompression.LZ4;

    Currently, it uses the GetCompressionForIdentifier override function, which sets the compression for each bundle type. However, the Default Unity Shaders special bundle doesn't have an override compression value set, so it defaults to the BuildParameters default (which, if you look in BuildParameters.cs constructor is set to LZMA).

    Now this results in simply hard-coding the compression to LZ4, but for us it seems to do the trick and might be worth hooking it up in a smarter way to be more customisable.
     
    tonialatalo likes this.
  11. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    when in doubt, you can always file a bug. This case feels like a good one to file.
     
    tonialatalo likes this.
  12. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    @BFS-Kyle - thanks a ton for the fix! Helped in my case too and can now get forward.

    I was on the right track at one point, tried to create addressable asset settings also for the built-in shaders so that could set the right compression there, but didn't get it solved like that.

    @unity_bill, yes, this is a bug which basically prevents use of addressables for Web browser builds AFAIK. I can file it later today. This is also present in the latest 1.1-preview version.

    BTW, am I right that there is no git repo available for Addressables or other packages made by Unity? Seems that the only way to modify the code is to download the package using package manager and then modify the code in the cache under Packages in the project. Luckily that was possible.
     
  13. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    We are looking into making a public repo, but haven't yet. As of 2019.2 and older, you do need to copy the code out of your cache or just edit it directly there (if you copy it into the packages directory, most IDE's understand it better). As of 2019.3, there's a "develop" button in package manager that will copy the package into your project automatically.