I can add a git URL to the project manifest, but I haven’t quite figured out how or where to add git URLs for dependencies in package manifests. If I add them to the project manifest, it adds the packages to the project. Which isn’t quite what I’m after.
I want to be able to add a package to the project from a git URL, where the package is able to retrieve its dependencies from other git URLs. Currently, it seems the package manifests only allow us to specify semver values for dependencies, but the Package Manager isn’t able to find the dependencies because they aren’t in the project manifest. Is there a way to specify git URLs in the package manifest?
If not, what’s the recommended workflow to achieve a similar result?
You are correct, this is not currently supported and using a scoped registry would be a good alternative for now. This is a commonly requested feature though so stay tuned
So I got npm setup with verdaccio locally. I can see a couple trade-offs with each workflow.
I think the biggest benefit of allowing the use of git URLs in package manifests, similar to how git URLs currently work with project manifests in 2019.3, would be that you could quickly and easily setup up and get running with packages without having to leave Unity, especially for ones with dependencies outside the scope of Unity official packages. The drawback is that you wouldn’t have a registry to reference any updates or additional package versions from. Which is a big part of package management.
On the other hand, setting up a scoped registry takes additional time and resources to setup. Which can be a barrier to entry for anyone unfamiliar with the tech or unwilling to maintain it due to time and cost restraints. The overhead and responsibility involved in setting up and maintaining a scoped registry is not insignificant, but it may be the more appropriate solution and necessary for developers as they scale up their operations.
Still no ETA. But we now have a new tool to let you express your need for this feature. Go to the Unity Roadmap web page. Click on the Package Management tab. There is a button to submit feature requests/ideas. Submitting feature requests through this portal would help promote the feature priority.