Search Unity

Question com.unity.services.core package minimum version

Discussion in 'Package Manager' started by CaioRosiscaKG, Jun 14, 2022.

  1. CaioRosiscaKG

    CaioRosiscaKG

    Joined:
    Oct 13, 2020
    Posts:
    4
    Hello,

    We're trying to update a project to Unity 2021 and while doing so I ran into an issue where Newtonsoft.Json.dll got duplicated, so just to give some context, we do publish this dll as a package on our own package registry. At the moment not relying on our version is not an option.

    So what I'm trying to do is get rid of the com.unity.nuget.newtonsoft-json dependency. I downgraded com.unity.purchasing from 4.1.5 to 4.0.3, which requires services.core@1.0.1, which has no newtonsoft-json dependencies.

    The issue now is that whenever I recompile the project on Unity 2021.3.35f1 it bumps
    com.unity.services.core to 1.4.0 and adds a dependency to newtonsoft-json@3.0.2.

    There are no other packages that depend on newtonsoft-json or services.core in the manifest/manifest-lock, so I believe this is some internal dependency.

    Unfortunately I can only find documentation regarding this package on Unity's manual for 2019: https://docs.unity3d.com/2019.4/Documentation/Manual/com.unity.services.core.html

    How can I find out exactly which versions of com.unity.services.core each Unity version requires?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,956
    If you want to modify a downloaded package in a project, you have to copy it to the Assets folder (preferably under Plugins) and remove the package reference from the project. Then you can edit it without unity restoring it every time.

    Check the package cache folder, it should have all package versions you downloaded thus far. But I don‘t have the location in my head right now.
     
  3. CaioRosiscaKG

    CaioRosiscaKG

    Joined:
    Oct 13, 2020
    Posts:
    4
    The goal is not really to modify the package but instead understand where the dependency for "com.unity.services.core@1.4.0" is coming from
     
  4. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,143
    To see what packages depend on a particular package, you can enable this option: 'Package Manage/Cog Icon/Advanced Project Setting/Show Dependencies'.
    Or you can manually open the 'Packages/packages-lock.json' file and find which packages are using 'com.unity.services.core'.
     
    CaioRosiscaKG likes this.
  5. gtalwadkar

    gtalwadkar

    Joined:
    Jun 19, 2019
    Posts:
    10
    "com.unity.services.analytic@4.0.1" which was added from iap@4.2.1 has dependency on "com.unity.services.core@1.4.0".
    Even though Unity IAP mentions "com.unity.services.core@1.3.1" dependency, it is indirectly dependent on "com.unity.services.core@1.4.0".
    Is anyone able to get fix for the issue?
     
    Last edited: Aug 10, 2022
  6. chishimbaemmanuel97

    chishimbaemmanuel97

    Joined:
    Sep 2, 2021
    Posts:
    1
    Bro did you fix this issue