Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Netwonsoft Json Unity Package Clashes

Discussion in '2019.3 Beta' started by VOTRUBEC, Jan 4, 2020.

  1. VOTRUBEC

    VOTRUBEC

    Joined:
    Dec 17, 2014
    Posts:
    106
    This was the closest forum I could find to post into.

    The Netwonsoft Json Unity Package that is forced into new projects, clashes with previously inlcuded Netwonsoft Json DLLs. Why would I want my own DLL in there? The answer is simple - because I want a version that has been recompiled to be AOT compatible (IL2CPP, iOS etc, etc).

    Unless the Netwonsoft Json Unity Package has been compiled to be AOT compatible (which there's no mention of), the inclusion is just plain bad. And trying to remove it caused further issues, so it's in fact in-use and required.

    It IS possible to have an AOT version of the Newtonsoft Json library, so mabe that should be looked into?
     
    Awarisu likes this.
  2. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    225
    Can u even reference the newstonsoft.json namespace from the forced dll?
     
  3. Awarisu

    Awarisu

    Joined:
    May 6, 2019
    Posts:
    215
    There's a rarely-used C# feature designed for this very scenario, you can use an extern alias. Of course the proper solution would be to only have one Newtonsoft.Json.