/UpmGitExtension

Git extension for Unity Package Manager (UPM)

Primary LanguageC#MIT LicenseMIT

UPM Git Extension

This package extends the UI of Unity Package Manager (UPM) for the packages installed from git repository.

PRs Welcome

<< Description | Install | Usage | Development Note >>

What's new? See changelog

Do you want to receive notifications for new releases? Watch this repo

Support me on GitHub!

become_a_sponsor_on_github





Description

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!

Features

  • Link to git repository URL
  • Link to offline documents
    • Documentations
    • Changelog
    • License
  • Support GitHub, GitLab, Bitbucket, etc.
  • Install package from git repository URL with UI
  • Update package with a specific tag/branch
  • Remove package
  • Support Unity 2018.3 or later
  • Support .Net 4.x
  • Version filtering
  • Support GitDependencyResolverForUnity in Unity 2019.1 or later

Future plans





Install

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",
    ...
  },
}

Requirement

  • Unity 2018.3 or later
  • Git (executable on command-line)





Usage

Install a package from git repository

  1. Click giticon button in package manager UI to open Install Package Window

  2. Input a git repository url and click Find Versions button
  3. Select a tag or branch and click Find Package button
  4. Wait a few seconds for validation
  5. Click Add Package button to install the package

Update package with a specific tag or branch as version

You can update the package in your project, just like official packages.

For Unity 2019.1 or later

  1. Select the version of the package
  2. Click Update To *** button

For Unity 2018.3

  1. Click version popup and select a tag or branch in repository
  2. Click Update To button

Remove package

You can update the package from your project, just like official packages.

  1. Click Remove button





Development Note

Develop a package for UPM

The branching strategy when I develop a package for UPM is as follows.

Branch Description 'Assets' directory
develop Develop, Test Included
master Publish with legacy way (.unitypackage) Included
upm(default) Subtree to publish for UPM Excluded
{tags} Tags to install using UPM Excluded

Steps to release a package:

  1. Update version in package.json.
  2. Develop package project on develop branch.
  3. Close all issues on GitHub for new version.
  4. Generate CHANGELOG.md using github_changelog_generator and commit it.
  5. Merge into master branch and publish as new version.
  6. Split subtree into ump branch.
  7. Tag on ump branch as new version.
  8. Release.

For details, see https://www.patreon.com/posts/25070968.





License

  • MIT

Author

mob-sakai
become_a_sponsor_on_github

See Also