Problem with WebGL build in Unity in Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js

huangapple go评论58阅读模式
英文:

Problem with WebGL build in Unity in Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js

问题

The project stopped building, constantly giving an error:

> Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
> Traceback (most recent call last):
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 3571, in <module>
> sys.exit(main(sys.argv))
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 3564, in main
> ret = run(args)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 1082, in run
> phase_post_link(options, wasm_target, wasm_target, target)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 2400, in phase_post_link
> phase_emscript(options, in_wasm, wasm_target, memfile)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 2428, in phase_emscript
> emscripten.run(in_wasm, wasm_target, final_js, memfile)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 830, in run
> emscript(in_wasm, out_wasm, outfile_js, memfile, shared.DEBUG)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 308, in emscript
> glue, forwarded_data = compile_settings()
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 178, in compile_settings
> cwd=path_from_root('src'), env=env)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 216, in run_js_tool
> return check_call(command, *args, **kw).stdout
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 202, in check_call
> return run_process(cmd, *args, **kw)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 97, in run_process
> ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 474, in run
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 926, in communicate
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\cp1251.py", line 23, in decode
> UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 52658: character maps to <undefined>

Errors on build

Problem with WebGL build in Unity in Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js

I deleted the Bee, and then the Lib folder, tried to run it on my 2021.3.11 version, then updated to 2021.3.24. Changed some build settings. And still this error

英文:

The project stopped building, constantly giving an error

> Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
> Traceback (most recent call last):
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 3571, in <module>
> sys.exit(main(sys.argv))
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 3564, in main
> ret = run(args)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 1082, in run
> phase_post_link(options, wasm_target, wasm_target, target)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 2400, in phase_post_link
> phase_emscript(options, in_wasm, wasm_target, memfile)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\contextlib.py", line 74, in inner
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emcc2.py", line 2428, in phase_emscript
> emscripten.run(in_wasm, wasm_target, final_js, memfile)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 830, in run
> emscript(in_wasm, out_wasm, outfile_js, memfile, shared.DEBUG)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 308, in emscript
> glue, forwarded_data = compile_settings()
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\emscripten.py", line 178, in compile_settings
> cwd=path_from_root('src'), env=env)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 216, in run_js_tool
> return check_call(command, *args, **kw).stdout
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 202, in check_call
> return run_process(cmd, *args, **kw)
> File "C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\tools\shared.py", line 97, in run_process
> ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 474, in run
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 926, in communicate
> File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\cp1251.py", line 23, in decode
> UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 52658: character maps to <undefined>

Errors on build

Problem with WebGL build in Unity in Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js

I deleted the Bee, and then the Lib folder, tried to run it on my 2021.3.11 version, then updated to 2021.3.24. Changed some build settings. And still this error

答案1

得分: 0

我不明白问题的确切原因是什么,但很可能错误出在外部方法的dll导入行上。经过超过10次的构建、删除和添加脚本,然后再次更改相同的不幸脚本后,才发现问题。在没有这行代码的情况下,它成功构建了,但在加上这行代码后却无法构建。在清理并重新编写后,在查看外部js方法时没有找到任何问题,它突然就能正常工作了。

英文:

I didn't understand what exactly was the problem, but most likely the error was in the dll import line of the external method. It turned out to find out after more than 10 builds, deleting and adding scripts, and then changing the same ill-fated script
It was built without this line, but not with. And after clearing and writing it again, after looking and nothing-wrong-founding in external js method, it suddenly worked

huangapple
  • 本文由 发表于 2023年5月10日 16:53:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76216558.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定