I’m trying to add Custom git package dependency for my package
But it is not working
I think I followed the manual well. What’s the problem?
I’m trying to add Custom git package dependency for my package
But it is not working
I think I followed the manual well. What’s the problem?
Packages cannot have dependencies to git URLs. It’s just not possible (*).
Instead, add the dependency the usual way by specifying its package name and version number only. For example: "com.devlab.chipmunklibrary": "1.0.0"
Then you and any other user would have to manually clone the repository to a location somewhere on your drive, or directly into the project so that the package resides in /Packages/com.devlab.chipmunklibrary as an embedded package. You may want to add this path to .gitignore if you don’t intend to push, or you could pull it into the project as either a git submodule or subtree.
(*) come to think of it … yes, there are github repositories with editor scripts that allow you to resolve git url package dependencies, but they rely on the project throwing one or more successive errors that they catch, then they try to download the git repo, and repeat that process until no errors remain. This is very hack-ish and potentially unreliable. Of the 4-5 repositories I checked out which provide that feature, only one was engineered to a degree where I’d be comfortable to work with and possibly alter the code. I believe it was this one: GitHub - mob-sakai/GitDependencyResolverForUnity: This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
PS: does your Chipmunk have anything to do with the 2d Physics library Chipmunk?
I followed the manual (like this link) and it seems to suggest that using Git URLs for dependencies should work.
Since you mentioned it’s not possible to use Git URLs for dependencies directly, could you clarify what the documentation is actually for? Is it meant for specific cases where Git URL dependencies are supported, or is there something that prevents this from working in certain situations?
Any help would be appreciated!