Json.NET under Unity3d for iOS

后端 未结 7 1365
你的背包
你的背包 2021-02-20 06:37

has anyone succeeded to adapt/port Json.NET to a version able to run under Unity3d deployed to iOS (and the webplayer, and android, too, but these seem less problematic), someho

7条回答
  •  花落未央
    2021-02-20 06:51

    I have been facing the same issue for a while and searched on every nook and cranny of the internet to look for a solution. Here's what worked for me.

    • I replaced NewtonSoft.Json with NewtonSoft.Json for Unity
      • Uninstalled NewtonSoft.Json from Unity's Nuget package manager.
      • Install NewtonSoft.Json for Unity with Unity's package manager. Follow this installation steps

    What's the difference?

    • NewtonSoft.Json for Unity is different from standard NewtonSoft.Json
    • NewtonSoft.Json does not support AOT targets for IL2CPP builds in Unity
    • NewtonSoft.Json for Unity supports AOT targets such as all IL2CPP builds (WebGL, iOS, Android, Windows, Mac OS X) and portable .NET (UWP, WP8).

    Hope this helps. Cheers!

提交回复
热议问题