Introduction
Hi, I am working on several projects.
I use the Custom Package that exists in the local Packages folder by importing it from another project.
However, there is a dependency between the modularized packages.
When I define the dependencies in package.json, I would like to specify a relative or absolute path.
I know that Unity Packages download packages from pre-specified addresses or copy packages from package cache.
So I thought, if you have a pre-defined Dictionary, I can do that local environment.
So I already checked that the package was downloaded automatically when I put it in the package cache with the naming standard. However, I believe this is not a proper solution and is a temporary one. We could use an expedient, for example, symbolic links. I would like to build a custom package in a version control-friendly way and find a way to install it according to its dependencies.
My Question
Is there a way to automatically download packages via dependency mapping without manually placing them in the Appdata’s Local Folder?
Can I edit the codes of Package Manager?
What I Want To…
Share and use packages within an internal network, but find a version control-friendly way.
File-based dependencies are not currently supported, but that feature is on our roadmap of improving custom package support. I would advise against altering the package cache since this might not be future-proof, but you already seem to know that.
Unfortunately the answer to both your questions is no, but we do have support for custom registries, so this may be of help. Since you’re trying to share packages within an internal network, have you tried setting up an npm registry like Verdaccio? This would let you publish your packages internally and use them by configuring scoped registries.
Another option would be to use Git-based dependencies, but this is currently limited to packages stored at the root of their Git repository. (Note: the feature to support packages nested at an arbitrary depth in the Git repository is currently in the works for 2020.1.)
I’m sorry, I have nothing new to report yet, but it’s still on the roadmap. Unfortunately I cannot say when we get to tackle that exactly, it may not be anytime soon.