- Home /
Can't build game for WebGL
When trying to build my game, I got these errors:
Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(317,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock' Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(348,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock' Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(388,30): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock' Library\PackageCache\com.unity.multiplayer-hlapi@1.0.2\Runtime\NetworkDiscovery.cs(449,34): error CS0117: 'NetworkTransport' does not contain a definition for 'SetMulticastLock' Library\PackageCache\com.unity.analytics@3.3.2\DataPrivacy\DataPrivacyButton.cs(28,13): warning CS0618: 'Application.ExternalEval(string)' is obsolete: 'Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.' Error building Player because scripts had compiler errors Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) UnityEditor.BuildPlayerWindow+BuildMethodException: 5 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Also some details:
It happens only when building for WebGL, when I tried exporting to Windows I had no problem.
When trying to build the game it deletes the folder I made for it, in or outside the project folder.
It's a very simple, 2D game, if that matters here.
Any help would be appreciated
Your answer
Follow this Question
Related Questions
Android APK Build Failing "Execution failed for task ':launcher:checkReleaseDuplicateClasses'." 5 Answers
Gradle Build Error 1 Answer
Can't build my android project 1 Answer
Making a unity build fails every attempt. 0 Answers
LOTS of build errros 0 Answers