Search Unity

Huge WebGL build size in 5.6 vs 5.4

Discussion in 'Web' started by nsmith1024, Feb 15, 2017.

  1. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Anybody knows if the next release will address the build size issue?

    I spend weeks pain stakingly reducing my build size with 5.4, but when i upgrade to 5.6 the build size is now 40 Meg larger, and scene asset bundles has become 10 meg larger.

    So i end up going back to 5.40b24 because larger builds takes longer to load and longer to change scenes.

    Anybody knows if this will be fixed in the next release?
     
  2. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Have you filed a bug report?
     
  3. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    That should not happen. Please file a bug report with your repro project and ping the case number here.
     
  4. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    How do i file a bug report? Can you give the link? thanks!
     
  5. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Do you have any Shaders listed in "Always include Shaders" in your Graphics Settings? Unity 5.5 will generate many more shader variants (to support new rendering features), which can increase the build size a lot for included shaders.
     
  7. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    Hello Jonas,

    Yes matter of fact I do have 13 shaders listed in the "always included shaders", so how can i get rid of the additional 40Meg of build size and 10 meg of scene asset bundle size when building with 5.6?

    Dont know much about shaders, but 40 Meg of shaders seems like a lot!

    Thanks
     
  8. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    You must check your Editor.log file after a build to see the size of your textures,models,sounds ect ....
     
  9. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    As @roka wrote, check your Editor.log for a breakdown. But, 40 MB for 13 shaders is quite realistic, unfortunately. When you add shaders to "always included shaders", Unity cannot know which permutations to include - which can mean "quite a lot of them". See this blog post by Aras for context: http://aras-p.info/blog/2017/02/05/Every-Possible-Scalability-Limit-Will-Be-Reached/

    So, best, try to avoid using "always included shaders" if you can.