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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

reduce webplayer file size?

Discussion in 'Editor & General Support' started by grka, Oct 10, 2015.

  1. grka

    grka

    Joined:
    Jan 14, 2015
    Posts:
    80
    How can I reduce the file size of the webplayer file?
    My current size is 48MB which takes very long to load so I try to find a way to reduce it. What can I do? So far I did the following:
    - I set the textures to 512 instead of 1024. Is that enough or do I have to edit it in an external tool like Photoshop?
    - I changed all wav files to mp3

    Do I have to remove all unused assets or is this done automaticlly by Unity?

    The build statistics shows the following:

    Textures 66.7 mb 60.7%
    Meshes 3.3 mb 3.0%
    Animations 3.0 mb 2.7%
    Sounds 2.1 kb 0.0%
    Shaders 12.1 mb 11.0%
    Other Assets 22.2 mb 20.2%
    Levels 756.6 kb 0.7%
    Scripts 1.1 mb 1.0%
    Included DLLs 0.0 kb 0.0%
    File headers 680.0 kb 0.6%
    Complete size 109.8 mb 100.0%

    I have 3 files with .asset endings from assets that I bought and use which are >10MB:
    15.0 mb 13.7% Assets/MyBoughtAsset1/NavMesh.asset
    12.9 mb 11.8% Assets/MyBoughtAsset1/New Terrain2.asset
    12.1 mb 11.0% Resources/unity_builtin_extra
    8.6 mb 7.8% Assets/MyBoughtAsset1/Demo/New Terrain.asset

    When I remove the files everything isn't working anymore so I can't delete it. Is there any way to edit these files and reduce the size?
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    Maybe download some assets as AssetBundles? So the game can start and extra assets download in the background.
     
    twobob and liortal like this.
  3. grka

    grka

    Joined:
    Jan 14, 2015
    Posts:
    80
    Sounds great. Do you have any link where it is described how to do that? I have some things like a cave system which can be loaded later and isn't needed in first place in my scene
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287