Help For Issues With Newtonsoft.Json.dll

Tobias
admin
Some developers report compiler issues with Newtonsoft.Json.dll in Unity.
PUN contains the Newtonsoft.Json.dll for some work in the Editor - not in the Player.
Quite a few packages and projects use Json in the Editor or player. This includes the PlayFab package!
Chances are you imported another plugin that uses the same assembly but the file location is different in the project. If a dll is in the project more than once, it will clash.
Search your project for "Newtonsoft.Json" and make sure there is only one such dll in the project.
Which dll to remove depends on the project but chances are good to remove the one of PUN!
PUNs copy of it is in this project folder: \Photon Unity Networking\Editor\PhotonNetwork
PUN contains the Newtonsoft.Json.dll for some work in the Editor - not in the Player.
Quite a few packages and projects use Json in the Editor or player. This includes the PlayFab package!
Chances are you imported another plugin that uses the same assembly but the file location is different in the project. If a dll is in the project more than once, it will clash.
Search your project for "Newtonsoft.Json" and make sure there is only one such dll in the project.
Which dll to remove depends on the project but chances are good to remove the one of PUN!
PUNs copy of it is in this project folder: \Photon Unity Networking\Editor\PhotonNetwork
1
Comments
-
just to add to this, if you intend to target iOS you will need to use a version of JSON dll that is compatible with IL2CPP (the Photon one is not)
https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-113470 -
Thanks for the input! Good to know.
The json dll which is included in PUN is only for the Editor. I would guess that Unity does not cross compile it for iOS.
0 -
For PUN 2.11, we removed the Newtonsoft dll.0
This discussion has been closed.