Search Unity

Question I want to reduce the size of the .wasm file.

Discussion in 'Web' started by takahashi_kiteretsu, Apr 25, 2023.

  1. takahashi_kiteretsu

    takahashi_kiteretsu

    Joined:
    Apr 25, 2023
    Posts:
    2
    I have done the following to shrink .wasm files, but is there any other way to make .wasm files smaller?

    Build Settings > Code Optimization : Disk Size
    Project Settings > Player > OtherSettings > IL2CPP Code Generation : Faster (smaller) builds , Managed Stripping Level : High
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,826
    In the Build Settings dialog choose a compression algorithm. Use compressed textures and reduce the max texture size and in player settings force a lower mipmap level when using mipmaps. Use the build log or an „asset hunter“ asset to determine both the largest files and any files that shouldn‘t be in the build (ie test assets).
     
  3. takahashi_kiteretsu

    takahashi_kiteretsu

    Joined:
    Apr 25, 2023
    Posts:
    2
    I had already set the texture size.
    The mipmap is a little smaller in size. Thanks.
     
  4. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    448
    If using URP, disable post-processing if you're not using it. It will strip a lot of shaders/textures from the build.
     
    Anthelmed likes this.