WebGL fails to build in 2021.2.0b14.3506.1 resulting in this error:
nternal build system error. BuildProgram exited with code -532462766.
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ArgumentException: You're trying to copy to C:/Build/Build/Build.framework.js more than once. Previously from Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.framework.js and now from Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.worker.framework.js
at Bee.Core.CopyTool.Setup(NPath target, NPath from)
at WebGLPlayerBuildProgram.WebGLPlayer.SetupCompression(NPath input, NPath output)
at WebGLPlayerBuildProgram.WebGLPlayer.SetupPostProcessBuildFile(NPath path)
at WebGLPlayerBuildProgram.WebGLPlayer.SetupPlayerExecutable()+MoveNext()
at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
at System.Collections.Generic.SparseArrayBuilder`1.ReserveOrAdd(IEnumerable`1 items)
at System.Linq.Enumerable.ConcatNIterator`1.LazyToArray()
at System.Linq.Enumerable.ConcatNIterator`1.ToArray()
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
at PlayerBuildProgramTypeWrapper.Run(String[] args)
at Program.Main(String[] args)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
I have tried different configuration and different project and build paths. Seems to fail in āRunBuildProgramPhaseā
I hit this problem in 2021.2.12f and discovered that it was because I had webGLThreadsSupport: 1 in my ProjectSettings.asset file (from a long-forgotten change). I changed this to 0, then loaded up unity and it worked ok.
Any clue why this doesnāt work? Iām experimenting with webGLThreadsSupport and would like to know if support for WebGL threading is concretized. If not, any idea about its roadmap?