Git extension for Unity Package Manager (UPM)
<< Description | WebGL Demo | Download | Usage | Development Note >>
What's new? See changelog ![](https://cdn.statically.io/img/camo.githubusercontent.com/770a885bdd970b20e0cfc06256ee04664dc9cc0b42c7c619984ca014eefc2031/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f6d6f622d73616b61692f55706d476974457874656e73696f6e2e7376673f6c6162656c3d6c61737425323075706461746564)
Do you want to receive notifications for new releases? Watch this repo ![](https://cdn.statically.io/img/camo.githubusercontent.com/b574bc802adfd47a3fac43c55238f7c2b250f032ea7a6ac0b68a5acfbf71fc19/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6d6f622d73616b61692f55706d476974457874656e73696f6e2e7376673f7374796c653d736f6369616c266c6162656c3d5761746368)
In Unity 2018.3, the Unity Package Manager (UPM) supported Git. :)
https://forum.unity.com/threads/git-support-on-package-manager.573673/
This update allows us to quickly install packages on code hosting services such as GitHub.
But, I'm not quite satisfied with the feature. :(
- Incorrect links to documents (readme, changelog, license)
- There is not a link to repo URL
- I wanna add, update, and remove the packages in the UI
This project extends the UI of Unity Package Manager for package installed using git!
- Show link to repository URL
- Override link to the document URL
- Readme
- Changelog
- License
- Support GitHub, Bitbucket and GitLab
- Add package from url
- Remove package
- Update package with a specific tag/branch
- Support Unity 2019.1+
- Support .Net 3.5 & 4.x
- View offline documents for private repository
- Display license
- Override the document URL with package.json
Find Packages/manifest.json
in your project and edit it to look like this:
{
"dependencies": {
"com.coffee.upm-git-extension": "https://github.com/mob-sakai/UpmGitExtension.git#0.8.1",
...
},
}
For Unity 2019.1+, use UpmGitExtension 0.5.0 or higher.
- Unity 2018.3+ (including 2019.1+)
- Click
+
button and selectAdd package from url
to open window - Input repository url and select a tag or branch
- Wait a few seconds for validation
- Click
Add
button to add package
- Click version popup and select a tag/branch in repository
- Click
Update To
button
- Click
Remove
button
The branching strategy when I develop a package for UPM is as follows.
Branch | Description | 'Assets' directory |
---|---|---|
develop | Development, Testing | Included |
master | Publishing | Included |
upm(default) | Subtree to publish for UPM | Excluded |
{tags} | Tags to install using UPM | Excluded |
Steps to release a package:
- Update version in
package.json
. - Develop package project on develop branch.
- Close all issues on GitHub for new version.
- Generate
CHANGELOG.md
usinggithub_changelog_generator
and commit it. - Merge into master branch and publish as new version.
- Split subtree into ump branch.
- Tag on ump branch as new version.
- Release.
For details, see https://www.patreon.com/posts/25070968.
The document URL in UnityPackageManager 2.0.3 is hard-coded.
The default values are as follows:
- View document:
http://docs.unity3d.com/Packages/{ShortVersionId}/index.html
or official manual page (only for built in package) - View changelog:
http://docs.unity3d.com/Packages/{ShortVersionId}/changelog/CHANGELOG.html
- View licenses:
http://docs.unity3d.com/Packages/{ShortVersionId}/license/index.html
orhttps://unity3d.com/legal/licenses/Unity_Companion_License
ShortVersionId is defined as follows:
{PackageName}@{MajorVersion}.{MinorVersion}
- For example:
com.coffee.upm-git-extension@0.1
Use UnityEditor.PackageManager.Client
class.
https://docs.unity3d.com/ScriptReference/PackageManager.Client.html
- Add/Update:
Client.Add({PackageId})
- Remove:
Client.Remove({PackageName})
PackageId is defined as follows:
{PackageName}@{MajorVersion}.{MinorVersion}.{PatchVersion}
(Unity official package){PackageName}@{RepoURL}#{BranchOrTagOrRevision}
- For example:
com.unity.package-manager-ui@2.0.3
,coffee.upm-git-extension@https://github.com/mob-sakai/UpmGitExtension.git#1.1.1
- MIT
- GitHub page : https://github.com/mob-sakai/UpmGitExtension
- Releases : https://github.com/mob-sakai/UpmGitExtension/releases
- Issue tracker : https://github.com/mob-sakai/UpmGitExtension/issues
- Current project : https://github.com/mob-sakai/UpmGitExtension/projects/1
- Change log : https://github.com/mob-sakai/UpmGitExtension/blob/upm/CHANGELOG.md