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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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.