NPMJS is the most popular Package destribution portal in the world. It is used for any packages from different programming areas of knowledge. We are interesting in using the platform for having dependencies on Unity packages only and publishing our own. It is free to use and work very well for my opinion.
- Ultra fast deployment
- Easy creation of new versions
- Unity Package Manager supports versioning from NPMJS
- Trusted platform by huge community
- Need to create account and authorize once
Popular in Unity community platform for package destribution. Created as open sourced project for helping people to destribute their packages.
- Made especially for Unity
- No registration needed
- Package can be deployed directly from GitHub repository
- Long deployment duration (10 - 60 minutes)
- Small community (in comparison to other options)
Amazing GitHub feature, also Unity support it
- Ultra fast deployment
- Trusted platform by huge community
- Does not support version fetching, it means you can't see when new version of the package is available in UPM. To install new version you should manually change the version in a project.
Unity UPM support direct GitHub links to public repositories for using them as a package. The only required thing - the link should point on a folder which contains package.json
file.
- no special steps required, just use your public repository as a package in UPM
- Does not support version fetching, it means you can't see when new version of the package is available in UPM. To install new version you should manually change the version in a project.
-
"Use this template" green button at top right corner of GitHub page
-
Clone your new repository
-
Add all your stuff to
Assets/_PackageRoot directory
-
Update
Assets/_PackageRoot/package.json
to yours -
(on Windows) execute
gitSubTreePushToUPM.bat
-
(on Mac) execute
gitSubTreePushToUPM.makefile
-
(optional) Create release from UPM branch on GitHub web page for support different versions
You may use one of the variants
- Select "Add package from git URL"
- Paste URL to your GitHub repository with simple modification:
https://github.com/USER/REPO.git#upm
Dont forget to replace USER and REPO to yours
https://github.com/USER/REPO.git#v1.0.0
Dont forget to replace USER and REPO to yours
Modify manifest.json file. Change "your.own.package"
to the name of your package.
Dont forget to replace USER and REPO to yours.
{
"dependencies": {
"your.own.package": "https://github.com/USER/REPO.git#upm"
}
}
Dont forget to replace USER and REPO to yours.
{
"dependencies": {
"your.own.package": "https://github.com/USER/REPO.git#v1.0.0"
}
}