WebGL Build Error

I have a project that I am trying to build using the WebGL. Every time I try to build and run the project, I am getting the following error message below.

Please take a look and see if anyone could help me with this error.


Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\tempStrip” -l none -c link -b False -x “C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\Whitelists\Core.xml” -f “C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors” -x “C:\EBS2\EBS Unity/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml” -x “C:\EBS2\EBS Unity\Temp\StagingArea\Data\preserved_derived_types.xml” -d “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Bluedrop.EPSS3D.Common.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Bluedrop.EPSS3D.Runtime.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\HighlightingSystem.dll” -a “C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\NGUI.dll”

stdout:
Fatal error in Mono CIL Linker
System.Exception: Error processing method: ‘System.Void HighlightableObject::InitMaterials()’ in assembly: ‘HighlightingSystem.dll’ —> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.ClothRenderer
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
— End of inner exception stack trace —
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.RunDriver(Driver driver)
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:94)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:107) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[ ], String[ ], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable1, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:100)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[ ], String[ ], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:131)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:201)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:135)
UnityEditor.PostprocessBuildPlayer : Postprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry)

Thank You Very Much

it looks like this is the problem:

In 4.x, ClothRenderer was used in combination with InteractiveCloth, which is not supported in 5.x
Is your project using InteractiveCloth ? If so, you will need to replace it with a different solution.

for more information, you may want to have a look at the upgrade guide and/or visit the physics forum.

Thank you Marco for you reply.
I was able to build the project for web player format and I don’t get any errors.
The WebGL build is the one causing the error.

Thank You,

That might be because the web player does not use il2cpp. I’d still recommend to remove InteractiveCloth/ClothRenderer.

Could you please help me to find the where I can remove the InteractiveCloth/ClothRender. I am beginner in Unity now I am trying my best to get the Project build successfully. This project was done few years ago, but for some reason HighlightEffect on clickable image is not working in the new web player update.

That’s why I wanted to build using the WebGL so it works on all browsers. I read Unity tutorials, forums but I unable to find a solution for this issue.

Thank You,