zappar-xr / zappar-unity-examples

18 stars 6 forks source link

FileNotFoundException when building to WebGL #2

Closed Oleksii-Burkun closed 3 years ago

Oleksii-Burkun commented 4 years ago

Hi!

I followed this tutorial, imported unity package from here.

When building to WebGL with selected Zappar template I am getting this error:

FileNotFoundException: Could not find file "/Volumes/KINGSTON/Projects/Test/Zapworks/Build/Build/UnityLoader.js" 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, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) (at :0) (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) (at :0) System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) (at :0) System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) (at :0) System.IO.StreamReader..ctor (System.String path) (at :0) (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string) System.IO.File.ReadAllText (System.String path) (at :0) BuildPostProcessor.OnPostProcessBuild (UnityEditor.BuildTarget target, System.String targetPath) (at Assets/Zappar/Scripts/Editor/BuildPostProcess.cs:17) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:177) UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass17_0.b__1 (UnityEditor.Build.IPostprocessBuildWithReport bpp) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:433) UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:391) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)

Did I miss any configuration?

cgauld commented 4 years ago

Hey!

That's strange - I wonder if you could confirm which version of Unity you're using and we'll see if we can replicate it?

Oleksii-Burkun commented 4 years ago

I am using Unity 2020.1.0f1

DerrickBarra commented 3 years ago

The Zappar WebGL build template is out of date. Unity changed how templates work in 2020.1 https://forum.unity.com/threads/changes-to-the-webgl-loader-and-templates-introduced-in-unity-2020-1.817698/

Oleksii-Burkun commented 3 years ago

When do you plan to update your SDK?

cgauld commented 3 years ago

Hi @Oleksii-Burkun - just a quick note to say we've released our updated SDK that addresses this issue (and featuring a number of other improvements too :-)) You get get the latest version over here: https://zap.works/universal-ar/unity/ Let us know how you get on!