Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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:
    31
    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:
    545
    senfield likes this.
  3. senfield

    senfield

    Joined:
    Apr 1, 2019
    Posts:
    31
    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.
     
    HelenL and maximeb_unity like this.
  4. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    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:
    545
    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:
    621
    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.)
     
    Menion-Leah likes this.
  7. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    545
    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).
     
  8. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189
    Any update on that?
    Maybe I'm missing something, but it looks like we cannot properly modularize our custom packages yet
     
  9. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    It's still on the roadmap - the team acknowledge that it's something worth pursuing but there isn't an ETA at present.
     
    Menion-Leah likes this.