playMaker

Author Topic: Datamaker: A Json conflict (Unity core package vs asset)  (Read 891 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Datamaker: A Json conflict (Unity core package vs asset)
« on: October 29, 2022, 02:54:38 PM »
In Unity 2021, with 'PlayMaker Datamaker' installed in the Assets folder, the Json subfolder creates the two following errors:

Code: [Select]
Library/PackageCache/com.unity.services.core@1.4.2/Runtime/Core.Internal/Registry/DependencyTreeExtensions.cs(51,24): error CS0433: The type 'JObject' exists in both 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=***************' and 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=***************'

Library/PackageCache/com.unity.services.core@1.4.2/Runtime/Core.Internal/Registry/DependencyTreeExtensions.cs(74,24): error CS0433: The type 'JObject' exists in both 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=***************' and 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=***************'

Respectively at the methods GetPackageJObject() and GetComponentJObject() of the DependencyTreeExtensions.cs script.

The Git repo PlayMaker--DataMaker--U4.3.4.SubModule- indicates that the Json folder was updated 3 years ago:

Quote
Changed Newtonsoft dll for compatibility

Unity has its own Newtonsoft Json, installed as dependency (see package manager), version 3.0.2.

For now I have excluded (~) the folder EditorOnly that contains the Newtonsoft.Json.Net20.dll file, but that's temporary. The actions dependent on this library are not going to work but at least actions in FSMs won't be throwing errors because a script is missing but the 'Net.' namespace can't be accessed for now. It's just a slightly better situation because the console remains silent.

What should be done to correct this error?
Could a newer version of the Datamaker extension be made to point at the package's content instead?
« Last Edit: October 29, 2022, 03:03:03 PM by Broken Stylus »

stryke

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Datamaker: A Json conflict (Unity core package vs asset)
« Reply #1 on: February 01, 2023, 12:55:31 PM »
Did you ever find a permanent solution to this? I ran in to the same issue.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: Datamaker: A Json conflict (Unity core package vs asset)
« Reply #2 on: May 21, 2023, 12:40:25 PM »
I have looked into that project and it's still the way I described, the JSON folder is still "tilded" out.
From what I verified, fortunately it doesn't prevent the XML functions from still working. They were crucial in collecting data from XML files carried within the software.
Unity or Playmaker will recreate a JSON folder though, but this one will stay empty.
If anything I'd simply suggest using the latest version of JSON that's in your project unless this renders some critical functions dysfunctional (for example, they go from supported to obsolete, then from obsolete to absent, which might break a project relying on older functions).

StephenWeaver

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Datamaker: A Json conflict (Unity core package vs asset)
« Reply #3 on: June 17, 2023, 07:41:50 AM »
Thank you, I will keep it in my mind. If you're interested in reading one of the best essays I've ever read on the subject of To Kill a Mockingbird, you can click here to read it. This site also has the largest collection of essays available there, and you can choose a writer from there to write your essay.
« Last Edit: June 23, 2023, 03:52:13 AM by StephenWeaver »