Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Should you use asset bundles to overcome the notirous 90% issue?

Discussion in 'WebGL' started by Jelmer123, Mar 15, 2021.

  1. Jelmer123

    Jelmer123

    Joined:
    Feb 11, 2019
    Posts:
    237
    When loading a unity webgl project, it often gets stuck loading on the last 95% or so percent. This is _afaik_ because the loaded data is being unpacked by the browser.
    My browser freezes for 2 minutes and then the game opens just fine.
    Heap size is 429 MB by then

    But how should I optimize this? I have 6 independent scenes.
    Would be right approach be to make asset bundles of each scene and only load/unload on demand? Or are there other options?

    And is the loading problem due to large textures (e.g. would it help compression all textures for WebGL a lot more?).
     
  2. Steven_Damian

    Steven_Damian

    Joined:
    Mar 1, 2021
    Posts:
    65
    Okay, so the only thing that i know is that it gets stuck at 95% or so percent because the data are being decompressed or loaded. I have got the same issue. My build is 10mb and it gets loaded in 2 seconds until 90% and then i wait 5 seconds for decompression. I think this is a system problem and unity should improve the loading somehow. This will be a game changer for sure. According to optimization i would advice you to compress you project with brotli. That's all i know.
     
    Restless_pilgrim and Jelmer123 like this.
  3. DerrickBarra

    DerrickBarra

    Joined:
    Nov 19, 2013
    Posts:
    210
    That's accurate, Unity's WebGL devs mentioned previously that they're working on optimization this year for mobile devices in WebGL, which should help out desktop browser loading as well.
     
  4. Steven_Damian

    Steven_Damian

    Joined:
    Mar 1, 2021
    Posts:
    65
    Wow really? I didn't know that! That's great! That made my day! So excited for the future. Let's go guys. Let's goooooo
     
    MrMatthias likes this.