Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question unity webgl Addressables issues

Discussion in 'Web' started by mike2022unity, May 24, 2023.

  1. mike2022unity

    mike2022unity

    Joined:
    Nov 29, 2022
    Posts:
    7
    At present, the project platform is webgl and the compression method is gzip. After packaging, the whole project is about 70M, which is slow to load on the mobile h5. Can Addressables be used for subcontracting to reduce the size of the initial project? Can you pack the whole scene into a package? Or a better optimization suggestion. Thank you

    Unity version

    2021.3

    platform

    webgl
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    Try Brötli (*) compression if you can, it offers slightly better compression ratio.
    There are other settings you can try, I detailed how to make an absolute min-size WebGL build here.

    * = it's "Brotli" but I think it sounds better when pronounced with a swiss dialect. :D
     
    GDevTeam likes this.
  3. mike2022unity

    mike2022unity

    Joined:
    Nov 29, 2022
    Posts:
    7
     
  4. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    75
    Brotli will help you have smaller sizes, but yes, you can use addressables to split up the content.
    I have a couple of projects right now that are like that; the initial scene is just very basic, UI, intro stuff, so it downloads very fast, and while you are consuming that content the rest of the project is downloading in the background.