Search Unity

Question WebGL Build Error. All Sprite Images Turned into White Squares After Build

Discussion in 'Web' started by izzanfuad, Feb 21, 2024.

  1. izzanfuad

    izzanfuad

    Joined:
    Dec 7, 2021
    Posts:
    32
    Hi, I'm new to WebGL and wanted to ask if I have missed a step regarding WebGL Build. In the editor the game run just fine but after building it, all of the textures suddenly gone.
     

    Attached Files:

  2. izzanfuad

    izzanfuad

    Joined:
    Dec 7, 2021
    Posts:
    32
    Here's a ss on what it looked like including the error. As you can see in the error image below, the button is still there but it just won't show the texture.



    Here's the error code:
    Code (CSharp):
    1. Unknown error occurred while loading 'sharedassets0.assets'.
    2.  
    3. _JS_Log_Dump @ 1.0.1.9.framework.js.gz:2
    4. $func6116 @ 1.0.1.9.wasm.gz:0x3266bb
    5. $func6118 @ 1.0.1.9.wasm.gz:0x32683f
    6. $func6113 @ 1.0.1.9.wasm.gz:0x326563
    7. $func6112 @ 1.0.1.9.wasm.gz:0x325db1
    8. $func6870 @ 1.0.1.9.wasm.gz:0x370559
    9. $func6859 @ 1.0.1.9.wasm.gz:0x36f070
    10. $func6670 @ 1.0.1.9.wasm.gz:0x35723d
    11. $func6669 @ 1.0.1.9.wasm.gz:0x356e0a
    12. $func6656 @ 1.0.1.9.wasm.gz:0x35561a
    13. $func6653 @ 1.0.1.9.wasm.gz:0x355147
    14. $func6652 @ 1.0.1.9.wasm.gz:0x355106
    15. $func701 @ 1.0.1.9.wasm.gz:0x1147b4
    16. $func9512 @ 1.0.1.9.wasm.gz:0x433839
    17. $func13429 @ 1.0.1.9.wasm.gz:0x5caac1
    18. $func13509 @ 1.0.1.9.wasm.gz:0x5d8097
    19. $func13432 @ 1.0.1.9.wasm.gz:0x5caeee
    20. $func13648 @ 1.0.1.9.wasm.gz:0x5edc78
    21. $func13647 @ 1.0.1.9.wasm.gz:0x5ed5b9
    22. $func13430 @ 1.0.1.9.wasm.gz:0x5cace1
    23. $func13415 @ 1.0.1.9.wasm.gz:0x5c9098
    24. $func13388 @ 1.0.1.9.wasm.gz:0x5c3916
    25. $func13386 @ 1.0.1.9.wasm.gz:0x5c2b26
    26. $func13355 @ 1.0.1.9.wasm.gz:0x5c1ee0
    27. $func13045 @ 1.0.1.9.wasm.gz:0x59ce61
    28. $func13045 @ 1.0.1.9.wasm.gz:0x59ce76
    29. $func13040 @ 1.0.1.9.wasm.gz:0x59c9fb
    30. $func13033 @ 1.0.1.9.wasm.gz:0x59ac72
    31. $func13183 @ 1.0.1.9.wasm.gz:0x5abf72
    32. $dynCall_vi @ 1.0.1.9.wasm.gz:0x27309b7
    33. (anonymous) @ 1.0.1.9.framework.js.gz:2
    34. dynCall @ 1.0.1.9.framework.js.gz:2
    35. dynCall_wrapper @ 1.0.1.9.framework.js.gz:2
    36. wrapper @ 1.0.1.9.framework.js.gz:2
    37. (anonymous) @ 1.0.1.9.framework.js.gz:2
    Anyone knows what the issue is?
     
  3. izzanfuad

    izzanfuad

    Joined:
    Dec 7, 2021
    Posts:
    32
    Oh and here's my config
    Code (CSharp):
    1.  
    2. <IfModule mod_mime.c>
    3.     RemoveType .mem
    4.     RemoveType .data
    5.     RemoveType .unity3d
    6.     RemoveType .jsbr
    7.     RemoveType .membr
    8.     RemoveType .databr
    9.     RemoveType .unity3dbr
    10.     RemoveType .jsgz
    11.     RemoveType .memgz
    12.     RemoveType .datagz
    13.     RemoveType .unity3dgz
    14.     AddType application/octet-stream .mem
    15.     AddType application/octet-stream .data
    16.     AddType application/octet-stream .unity3d
    17.     AddType application/octet-stream .jsbr
    18.     AddType application/octet-stream .membr
    19.     AddType application/octet-stream .databr
    20.     AddType application/octet-stream .unity3dbr
    21.     AddType application/octet-stream .jsgz
    22.     AddType application/octet-stream .memgz
    23.     AddType application/octet-stream .datagz
    24.     AddType application/octet-stream .unity3dgz
    25.  
    26.     # The following lines are required for builds without decompression fallback, compressed with gzip
    27.     RemoveType .gz
    28.     AddEncoding gzip .gz
    29.     AddType application/gzip .data.gz
    30.     AddType application/wasm .wasm.gz
    31.     AddType application/javascript .js.gz
    32.     AddType application/octet-stream .symbols.json.gz
    33.  
    34.     # The following lines are required for builds without decompression fallback, compressed with Brotli
    35.     RemoveType .br
    36.     RemoveLanguage .br
    37.     AddEncoding br .br
    38.     AddType application/octet-stream .data.br
    39.     AddType application/wasm .wasm.br
    40.     AddType application/javascript .js.br
    41.     AddType application/octet-stream .symbols.json.br
    42.  
    43.     # The following line improves loading performance for uncompressed builds
    44.     AddType application/wasm .wasm
    45.  
    46.     # Uncomment the following line to improve loading performance for gzip-compressed builds with decompression fallback
    47.     AddEncoding gzip .unityweb
    48.  
    49.     # Uncomment the following line to improve loading performance for brotli-compressed builds with decompression fallback
    50.     # AddEncoding br .unityweb
    51.  
    52. </IfModule>
    53.  
     

    Attached Files: