-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unity: Newtonsoft JSON library conflicts with version that Unity includes by default #753
Comments
Thanks @eAi for providing details. The library wouldn't care if it is a later version but it doesn't sound ideal to have @tomkirbygreen one more reason we should remove json.net as a direct dependency. We need to update the readme as well. |
I hear you :-) |
Having just hit this issue when trying to use Ably on latest LTS Unity (2020.3.16f1 LTS), it would certainly have been convenient to have had the install be easier. The |
So it mades it impossible to use with ILCPP compilation in this case, init crash ! |
I'm not sure I follow you, could you provide a little more information please. Steps to recreate the crash you're seeing would be favourite, along with the version of Unity you're using. |
Sorry, i forget that I clicked on the Comment button... I have create a separated issue about IL2CPP, at the end, my crash was not linked to this conflict. |
Further thoughts from @tomkirbygreen ... Retire Newtonsoft Json .NETWe currently use an old version of the Newtonsoft Json .NET library. This causes compatibility issues when used within Unity as it can clash with the version of Json .NET that ships with that platform. Longer term the Ably .NET SDK should move to use the Json support present in more recent versions of the .NET (refer to System.Text.Json) base class library. Doing so would remove a 3rd party component and better align the Ably .NET SDK with the platform. A good time to undertake this would be following the retirement of .NET 3.1 LTS and the adoption of .NET 6.0 LTS. |
Active discussion for the same - |
The new version of newtonsoft is by default included in unity versions -> https://forum.unity.com/threads/conflict-between-assets-newtonsoft-and-packagemanagers-newtonsoft.843898/#post-7849254. So, we can think about removing it from |
This isn't a major issue, but the Newtonsoft JSON library you include is now included in Unity's packages by default, so importing the Ably package into Unity causes compile errors about duplicate versions of a DLL. Deleting the included JSON library doesn't fix this error as the versions used are different (Ably uses version 9.0.0.0, Unity version 12.0.0.0) - but this can be worked around by turning off "Assembly Version Validation" in the Player Settings - this doesn't seem ideal though as it may have consequences for the rest of the project.
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: