Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Are Package Dependencies Supported in 2018.3?

Discussion in 'Package Manager' started by zheck, May 13, 2019.

  1. zheck


    Oct 30, 2018
    I recently got a scoped registry setup and am wondering to what extent, if any, the package manager handles dependencies?

    I've defined a dependency in a package.json on another package.json and when this is published my Verdaccio server it clearly listed the dependency and can link to the asset properly. When I get in Unity however the Package Manager doesn't display any dependencies. If I'm not mistaken there are many elements to a package.json but Unity only supports a handful of them? I also tried creating a dependency in Unity via Assembly Definition References but this didn't seem to work either.

    So here are some questions!

    • If I define a dependency in a package.json, should I expect that dependency to be visibly listed in the Package Manager when highlighting that package?
    • Should I expect the Package Manager to resolve dependencies on install and automatically install dependencies for me?
    Edit : Looks like I figured out what's going on! UPM is successfully installing my package's dependencies. UPM is not showing in its Editor Window that this dependency has been explicitly installed, however. If you go to ../Library/PackageCache/ you will see the dependencies installed in that location. You will not see them in your Asset window's Packages folder, but they will be installed. I guess you could call it like... a shadow install? Either way, it is successful!

    If anyone reads this though and could fill me in about the listed dependency in the UPM Editor Window (aka my first question) that'd be cool though! Thanks!
    Last edited: May 13, 2019
  2. mathieur


    Unity Technologies

    Jul 22, 2015
    Hmmmmm, all packages from a scoped registry should be visible in the package manager window. So in the case you mention, the `All Packages` filter should include the transitive dependency (shadow install). In the `In Project` filter though, it's normal that the transitive dependencies are not shown. Only the explicitly installed packages will shown in this list.