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 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 WebGL build much smaller than PC builds

Discussion in 'Web' started by RobertBleyl, Sep 30, 2020.

  1. RobertBleyl


    May 16, 2019
    I'm developing on Linux (Ubuntu 20.04) with Unity 2020.1.6f1. When I build to WebGL the result is about 75 MB, but when I build to Linux, Mac or Windows (with LZ4HC compression enabled) the result is over 400 MB. Where does this huge difference come from? The resulting WebGL build runs fine in Chrome; every asset is where I expect it, at the quality I expect it. I even uploaded the WebGL build to and it runs fine there as well.

    How come the WebGL build is so much smaller than the PC builds? What can be done about the PC build being that big?
    My Assets folder is about 270 MB in size - so why is my WebGL build not even half the size of that?
  2. wetcircuit


    Jul 17, 2012
    Unity defaults to resizing webGL texture maps to 512*512. Typical desktop textures are 2k. Unity does compression and repacking on all textures when it builds, but it would be easy to balloon the overall build if using pbr materials with 4-5 texture maps each.
    RobertBleyl likes this.