-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Unity3d Engine support #1440
Comments
i'm using this tool in unity with no problem, what needs to be done? Are you talking of scene serialization? |
But it's not works on iOS with AOT (unity3d with IL2CPP) |
+1 Any plans to support Unity? |
Wish to support latest unity3d perfectly. |
The Unity 2018 has an API capability with the |
I may not still run under IL2CPP for Android or iOS even if .NET Standard 2.0. |
I have manually built What i've changed:
You can apply this patch on tag Used define symbols:
|
Version 12.0.1 works in Unity 2018.3 out of the box, but fails when building with IL2CPP. I get a nullreference exception when trying to deserialize a string. The workaround of @dngulin will probably work (I haven't tested it yet) but is rather cumbersome when you want to update the Json.NET package in Unity3d each time a new version is released. |
@squibel IL2CPP does LINQ interpretation. MONO does LINQ compilation. JSON uses LINQ to be faster. But JSON can use reflection only. I guess @dngulin did that - reflection with Unity specific hacks. Other option is to Unity to fix bugs in LINQ interpretation (I raised a bug for that but not yet provided sample). Here is sampe for binary MessagePack-CSharp/MessagePack-CSharp#338 . So bug is in Unity. Not in JSON.NET. But JSON.NET could be changed to avoid bug in Unity. |
@dzmitry-lahoda So if I understand correctly Unity should fix their IL2CPP LINQ interpretation or a workaround could be built into Json.NET to avoid the Unity bug. |
I tried it personally and gotta say love it that it actually works. Been searching for a solution for a while and finally, at least a workaround. Sucessfully using Json.NET 12.0.1 in WebGL. I can try submitting it as an extra build via PR. Then let's hope it gets added so the steps dont have to be repeated by everyone selves. |
Everything in the editor always runs under Mono and never uses IL2CPP, that is why it works in the editor and fails during the IL2CPP build. |
Can you add Unity3d Engine supporting? https://unity3d.com/
The text was updated successfully, but these errors were encountered: