Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    5,533
    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.