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

Custom package's unity package dependency is not being installed

Discussion in 'Package Manager' started by senfield, May 9, 2019.

  1. senfield

    senfield

    Joined:
    Apr 1, 2019
    Posts:
    24
    So I have a custom package with "com.unity.addressables": "0.7.5-preview" as a dependency and it isn't installing the addressables package when it installs my custom package. I thought it was supposed to be as simple as adding that line to the dependencies section and then when my package is installed the unity one would be as well... doesn't this normally work? e.g. this kind of package.json:
    Code (JavaScript):
    1. {
    2.     "name": "com.me.assetprojectkit",
    3.     "displayName": "Asset Project Kit",
    4.     "version": "0.1.1",
    5.     "unity": "2018.3",
    6.     "description": "does things",
    7.     "keywords": ["asset", "mods", "bundle", "assetproject"],
    8.     "category": "",
    9.     "dependencies": {
    10.         "com.unity.addressables": "0.7.5-preview"
    11.     },
    12.   "repository": {
    13.     "type": "git",
    14.     "url": "myprivateurl"
    15.   }
    16. }
     
    Last edited: May 9, 2019
  2. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    144
    senfield likes this.
  3. senfield

    senfield

    Joined:
    Apr 1, 2019
    Posts:
    24
    Thanks, I got it figured out! The problem was actually that I did not have the addressables assemblies listed properly in my asmdef. The extra confusion stemmed from dependencies such as addressables NOT showing up in the project's packages list even though they actually are present. So it was hard to tell that it actually had installed so I thought the problem was with the package manager and didn't immediately think to look in the asmdef.
     
    maximeb_unity likes this.
  4. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    501
    Are local dependencies supported now? Because I'm on the latest package manager version and they don't seem to be.
     
  5. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    144
    Hi @christoph_r,

    Local dependencies for projects are supported, but packages cannot declare local dependencies at this time.

    Did you add a local dependency through the UI or dit you manually edit your manifest.json file? If you did it with a manual edit, make sure you have the right syntax: "file:<path>". On Windows, you need to either use forward-slashes ("/") or double back-slashes ("\\"). You can use either an absolute path or a relative path (relative to the Packages directory of your project).
     
  6. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    501
    Bummer, was getting my hopes up. Is that something that might happen soon™ or is it likely a couple of months before that will be tackled? Because that seems like the easiest way to handle custom packages for modularizing up our codebase (to entirely replace Projeny.)
     
  7. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    144
    Unfortunately I cannot provide an ETA, but loosening restrictions on package dependencies is definitely something we have on our roadmap, at least for "custom" packages (that is, packages that are not fetched from the main Unity registry).