WebGL building errors!

Hello fellow students and instructors !
I got to the end of the course pretty succesfully but when the time came to build my game i realized i did not have WebGL module loaded . So i reran the download assistant and ticked the webgl “plugin”.
Even if i did so whenever i get to the Build&Setting menu i still get the option “Switch Platform” and the “Build&Run” grayed out .
So , i switch platform and try to build the game but i get the following bunch of errors ( that i can’t figure in no way :frowning: ) :

  1. FileNotFoundException: C:\UnityProjects\2_Terminal_Hacker\Temp\StagingArea\Data\linkresult_wasm\build.wasm does not exist
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at :0)
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName) (at :0)
    UnityEditor.WebGL.WebGlBuildPostprocessor.AssembleOutput (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:665)
    UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:956)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  2. Error building Player: 2 errors

  3. Build completed with a result of ‘Failed’
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

  4. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in

For what it’s worth , i have installed my Unity on my D: drive because my C: is overloaded .
So the load destinations for various things on Unity must’ve been messed up and i can’t seem to figure out what i am supposed to do .

I would very much appreciate some info on this , Thanks a lot !

1 Like

try uninstall unity and reinstall it. When installing again select the desired target platforms.

Had the same problem, these steps helped:

  1. BACKUP your Hacker.cs file
  2. Blow away everything, all the files, your environment everything
  3. Make a fresh Unity project
  4. Reimport the Hacker assets, like the course taught us
  5. RECREATE the Hacker.cs file in Unity, in the assets folder, but leave it how it is
  6. COPY-PASTE your code from your Hacker.cs file backup
  7. Run the game in the Unity Editor to make sure it works
  8. Now try to build the WebGL game

What helped for me was simply to change the Output-destination to another harddrive.

i fix this problem here : https://www.youtube.com/watch?v=_Jl0q5U3R1A you can follow my step to fix this problem .

Hi, this article helped me a lot when I faced some problems with WEbGL. Maybe, it will help you.

Privacy & Terms