UPM (Unity Package Manager) ready GitHub repository for Unity New Unity packages system is very easy to use and make your project much more cleaner. The repository helps you to create your own Unity package with dependecies.
-
"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.jsonto 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#upmDont 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"
}
}

