Unity throws a build.bc error when trying to make a WebGL build
Hello, so I'm trying to export an old project of mine in a WebGL format, but I can't because of a couple of errors, mainly from some file called 'build.bc' not being found.
Here are the console entries that are generated when I try to build it:
Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Error building Player: 2 errors
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x00207] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:172 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
FileNotFoundException: Could not find file "C:\Users\dread\Documents\unity\Ultima\Temp\StagingArea\Data\Native\build.bc". System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:305) System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363) System.IO.File.ReadAllBytes (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:538) UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:429) UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:894) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:271) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I am on x64 Windows 10 version 1803, Unity version 2017.2.0f3, although my project was made in an earlier version (I don't know how to check which version it was), and the only external component in my project is the font that I'm using; everything else is made with stock Unity shapes. I have managed to successfully export it in an .exe format, so the issue shouldn't be because of the project. If anyone would try to provide me with assistance, then that would make me happy. Thank you!
Answer by mesnosmichael · Sep 24, 2018 at 03:55 PM
Just clean the cache of Unity and it will work as I heard
I'm new to unity and have the same problem for a game I created, what do you mean by that?