Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
976 stars 217 forks source link

Can't build with Webgl. #213

Open JeongGukAn opened 1 year ago

JeongGukAn commented 1 year ago

Can't build with Webgl. Standalone builds fine. using Unity3D 2021.3.5f1. getting the following error: image C:\Program Files\Unity\Hub\Editor\2021.3.5f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Dracodec.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Newtonsoft.Json.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/Siccity.GLTFUtility.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Data.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Numerics.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Runtime.Serialization.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/System.Xml.Linq.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.ImageConversionModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UnityWebRequestModule.dll --assembly=Library/Bee/artifacts/WebGL/ManagedStripped/UnityEngine.UnityWebRequestTextureModule.dll --data-folder=C:/Project/UnitySample/GLTF_Test/Library/Bee/artifacts/WebGL/il2cppOutput/data --generatedcppdir=C:/Project/UnitySample/GLTF_Test/Library/Bee/artifacts/WebGL/il2cppOutput/cpp --emit-method-map --generics-option=None,EnableFullSharing --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=C:/Project/UnitySample/GLTF_Test/Library/Bee/artifacts/il2cpp_conv_f9sc.traceevents --print-command-line Error: IL2CPP error for type 'System.Net.WebHeaderCollection/RfcChar' in assembly 'C:\Project\UnitySample\GLTF_Test\Library\Bee\artifacts\WebGL\ManagedStripped\System.dll' System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') at Unity.IL2CPP.CodeWriters.ChunkedMemoryStream.Seek(Int64 offset, SeekOrigin origin) at Unity.IL2CPP.CodeWriters.InMemoryGeneratedMethodCodeWriter.Write(IGeneratedMethodCodeStream other) at Unity.IL2CPP.SourceWriters.SourceWriterBase2.FlushStream(GlobalWriteContext context, IGeneratedMethodCodeStream stream, NPath filePath) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager3.WorkerWriteItemsToFile(WorkItemData2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler1.WorkerLoop(Object data) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Maadhav commented 1 year ago

@JeongGukAn Were you able to fix the issue? I am also facing the same issue

JeongGukAn commented 1 year ago

There is a newtonjson bug in the 2021 version. It works fine in 2020 version.

etaxi341 commented 1 year ago

Any fix for this yet?

DescendingAngel85 commented 1 year ago

I'm using Unity 2022.1.20 and the bug still exists. Is there anybody who has found a solution or workaround?