Search Unity

Local package dependency on another local package or git

Discussion in 'Package Manager' started by nz2develop, Nov 28, 2021.

  1. nz2develop

    nz2develop

    Joined:
    Oct 5, 2017
    Posts:
    7
    Is it currently possible to make such setup of [Unity Package Manager] packages?
    _
    package A is a local package, sits on hardrive at for example C:/packages/A,
    root folder contains only package.json with next content in it

    Code (../packages/A/package.json):
    1. {
    2.       "name": "com.example.a",
    3.       "version": "1.0.0",
    4.       ...
    5. }
    package B is also a local package, sits on hardrive at for example C:/packages/B
    root folder contains only package.json with next content in it

    Code (../packages/B/package.json):
    1.  
    2. {
    3.      "name": "com.example.b",
    4.      "version": "1.0.0",
    5.      ...
    6.      "dependencies" : {
    7.        "package_a": "file:../A"
    8.      }
    9. }
    10.  
    According to manifest docs, for the Unity Project manifest.json we could specify path to local package or git url, similar to as in package B example, but
    For package.json docs, it says that for package, dependencies field can contain:

    > A map of package dependencies. Keys are package names, and values are
    > specific versions. They indicate other packages that this package depends on.

    so that's probably why this is not working.
    _
    So is ther plans for this to be implemented?
    Or is there other way to do this setup?

    The reason for this is to have core package that is used across other packages
     
    Last edited: Nov 28, 2021
    emkusa likes this.