Vi que muitas pessoas tiveram este problema tanto aqui no curso como fora dele, problema este que a Unity gera erros no build.
Não sei se há alguma particularidade, mas estou rodando meu código no Ubuntu 20.04 LTS, com VS Code. Eu consigo jogar o jogo, mas não consigo compilá-lo através do "File > Build Settings > Build".
Métodos já tentado:
- Deleção do arquivo "Zumbi.sln";
- Deleção do diretório "Library/";
- Reimportação dos assets;
- Mudança de compatibilidade de API de .NET Standard 2.0 para .NET 4.x;
- Usar o botão "build" ao invés do "build and run";
- Troca do stack_size de 8192 pra 1024;
- Verificação de carácter e/ou espaços em branco especial no path do projeto;
- Troca do diretório dos arquivos de saída para um diretório diferente do de projeto;
- Movi todo o projeto para a área de trabalho;
- Reiniciei o computador diversas vezes.
Versão da Unity: 2020.1.4f1
Diretório da solution no computador:
~/Documentos/Cursos/Unity/Zumbi
Projeto no GitHub:
https://github.com/TheVini/Alura_Unity_Zumbi
Log do build:
Win32Exception: ApplicationName='python', CommandLine='-E "/home/vinicius/Unity/Hub/Editor/2020.1.4f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc" @"/home/vinicius/Documentos/Cursos/Alura Unity 1/Zumbi/Assets/../Temp/emcc_arguments.resp"', CurrentDirectory='/home/vinicius/Documentos/Cursos/Alura Unity 1/Zumbi/Temp/StagingArea/Data', Native error= mono-io-layer-error (2)
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at <c8c8707b2adc41b09ae682df75fe1fd0>:0)
System.Diagnostics.Process.Start () (at <c8c8707b2adc41b09ae682df75fe1fd0>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) (at <c8c8707b2adc41b09ae682df75fe1fd0>:0)
UnityEditor.WebGL.ProgramUtils.StartProgramChecked (System.Diagnostics.ProcessStartInfo p) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/ProgramUtils.cs:34)
UnityEditor.WebGL.WebGlBuildPostprocessor.EmscriptenLink (UnityEditor.Modules.BuildPostProcessArgs args, System.Boolean wasmBuild, System.String sourceFiles, System.String sourceFilesHash) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:431)
UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:473)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:912)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at /home/bokken/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, 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 /home/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:324)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00270] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /home/bokken/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /home/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)