0

I tried to build my game in webGL and i got this error

"Could not find file "C:\Users-----\OneDrive\Documents\Endless\Runner\Temp\StagingArea\Data\Native\build.bc"

The whole error is:

FileNotFoundException: Could not find file "C:\Users\ethan\OneDrive\Documents\Endless Runner\Temp\StagingArea\Data\Native\build.bc" System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at :0) System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) (at :0) (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 :0) System.IO.File.ReadAllBytes (System.String path) (at :0) UnityEditor.WebGL.WebGlBuildPostprocessor.LinkBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:470) UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:953) 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)

I'm rather new to unity and stackoverflow so don't be too hard on me.

DeanOC
  • 7,142
  • 6
  • 42
  • 56

2 Answers2

0

Try to move your project to another location. It could be a problem of file permissions with OneDrive.

Toux
  • 100
  • 3
  • 8
0

Normally most WebGL errors can be fixed by clearing the cache

This can be done by going to edit -> preferences and in the Preferences window go to GL cache tab and click clear cache.

Sharad Khanna
  • 352
  • 3
  • 11
  • This brought up a new error until I reopened unity now its back to this. –  Feb 18 '19 at 15:39