文章目录
- 错误日志
- 可能的原因及解决办法:
- 导出路径不能有中文
- 系统名(win)含有中文, 修改环境变量Temp和Tmp, 如下图:
- 真正的原因: 杀毒软件删除了部分wasm相关文件,如:
错误日志
Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
emcc2: error: '"C:/Program Files/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen\bin\wasm-metadce" --graph-file=C:\Temp\tmp8sp_k84m.txt Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm -o Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.wasm --mvp-features' failed: [WinError 2] ϵͳ�Ҳ���ָ�����ļ���
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:158)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <44a70d1b13cf47e29810e30f45ffae08>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)Build completed with a result of 'Failed' in 128 seconds (128027 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errorsat UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <44a70d1b13cf47e29810e30f45ffae08>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <44a70d1b13cf47e29810e30f45ffae08>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
可能的原因及解决办法:
导出路径不能有中文
系统名(win)含有中文, 修改环境变量Temp和Tmp, 如下图:
真正的原因: 杀毒软件删除了部分wasm相关文件,如:
*/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen/bin/wasm-metadce.exe
*/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/binaryen/bin/wasm-emscripten-finalize.exe
解决办法(二选一):
- 找到文件并还原到原位置
- 重装Editor