Error building WebGL in Unity 5.5
Hi there,
Since upgrading to 5.5 I'm getting an error when trying to build for WebGL, the error is as follows:
Exception: /Applications/Unity/Unity.app/Contents/il2cpp/build/il2cpp.exe did not run properly!
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:298)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:289)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:131)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:39)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:560)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()
Any help would be greatly appreciated.
Thanks.
This part of the error message is pretty general, so it doesn't give much indication of the problem. Is there another message in the Editor.log file? If so, please post it here.
Also make sure there is no errors in your scripts that causes the GUI to freak.
Does this shed anymore light on the issue?
Unhandled Exception: System.ArgumentException: Cannot specify directory "/Users/alexbrown/Projects/Unity/agtt/Assets/plugins/Android/beta" as an additional library file. Parameter name: --additional-libraries at Unity.IL2CPP.Building.BuildingOptions.Validate () <0x10c7867a0 + 0x00139> in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Cannot specify directory "/Users/alexbrown/Projects/Unity/agtt/Assets/plugins/Android/beta" as an additional library file. Parameter name: --additional-libraries at Unity.IL2CPP.Building.BuildingOptions.Validate () <0x10c7867a0 + 0x00139> in :0
Fixed it by removing that plugin it mentioned in the log file. Not sure how it got there to be honest! Thanks for you help.
Yes, that looks like it was the problem. I'm glad that you were able to correct it!
Answer by Nathan1258 · Dec 21, 2016 at 01:02 PM
Hey,
go to File > Build Settings > Player Settings and make sure your 'Api Compatibility Level' under 'Optimization' is set to '.NET 2.0 Subset'
If that don't work then text me back.
Nathan
Your answer
Follow this Question
Related Questions
Building to WebGL failing, failed running il2cpp.exe 1 Answer
Unity 5.6.4p3 WebGl "il2cpp did not run properly" 1 Answer
build with IL2CPP error 0 Answers
Failed to Build for WebGL 1 Answer
Failed Running UnityLinker.exe 2 Answers