Best practices for package editing via GitHub/Artifactory

Hi all,

We’ve been working on our packages workflow recently and have some nice things in place, but we aren’t sure on the best approach for editing of packages, since Unity packages are a bit different and usually require more in-editor / in-project testing for context and can’t simply be edited independently.

Currently:

  • We have an Artifactory repository where we publish our custom-made packages to
  • Our projects have this Artifactory registry in our scopedRegistry of our manifest.json, to pull down new packages, and this works great
  • All our project source code lives in GitHub and we would like to use this as version control for our packages source as well

We haven’t decided:

  1. Should we have one GitHub repo for all our packages, or one repo per package
  2. If we have the packages source in GitHub and the package artifacts in Artifactory, how can we then make changes to the packages considering they usually require testing in Unity? We don’t want to edit them locally in the project, then copy the changes to our local GitHub repo and push; but we also don’t want to edit them on the GitHub repo because then we can’t test them in context of our projects

Any suggestions on best practices here would be greatly appreciated!

2 Likes

As an update in case anyone was curious how we ended up doing this:

  1. We have one GitHub repo for all packages
  2. We created an Editor script which simply switches the lines in Packages/manifest.json between the project copy and the local repository copy - this way you switch to the local repository copy when you want to edit/test changes in your project, and you can still push it as it’s in a repository.
1 Like