Sure, in the Package Manager window you can click the +
button and Add package from package ID...
. The package ID should be in the format @ where the URL ends with “.git”. For more information on formatting the URL (such as specifying a branch or specific commit) see here:
If you open your project manifest (/Packages/manifest.json) you will see the git package has been added to “dependencies” and a “lock” attribute is set. This means your Unity project is locked to that specific revision of the repo e.g.
{
"dependencies": {
"my-package": "https://bitbucket.com/my-package.git"
},
"lock": {
"my-package": {
"hash": "abc123",
"revision": "HEAD"
}
}
}
If you push a new revision and you want your project to get it, simply delete the whole “lock” entry and Package Manager will grab the latest i.e.
{
"dependencies": {
"my-package": "https://bitbucket.com/my-package.git"
}
}
Be careful not to leave any trailing commas behind as this is not valid JSON