I’ve created a custom package and set it up on GIT.
i’m able to install the package via the package manager using Unity 2020.2.0f1.
(WindPoweredGames.Core version 0.0.1)
Outside the project, i make a change to this package and update version 0.0.2 to GIT. I make sure to reflect this change in the package.json.
I go back to the project and refresh the package manage lists. version 0.0.1 is still shown as the latest and only version.
no matter what i do 0.0.2 never shows as an update or option.
the only way to even know that 0.0.2 is available is to first uninstall the package and then reinstall the package using the GIT URL and then 0.0.2 is downloaded… however, even in this case, the old version 0.0.1 is not shown in the history.
am i missing a step or mechanic?
why don’t custom packages seem to work like unity official packages in the ability to update?
Git packages just work differently, you don’t have access to all the versions history.
I believe there might be another package that you can download that can add that functionality but I don’t remember which one.
To get the latest git package you have to remove the package-lock manually :
ProjectRoot/Packages/packages-lock.json or in the manifest.json in older version of Unity
Btw I’m having an issue with authenticating when using a private Git repo. Have you ever done that on MAC?
There are a few reasons, one being the performance hit that running git operations would have every time we generate the package list.
The second, and probably the most important one, is that there is no way for us to tell “version releases” apart by just cloning the repo.
The mutability of git makes it so the same “version” could end up being a completely different snapshot depending on what time of the day it was fetched, and building the version history would be tricky to say the least. Not that this is impossible to address (e.g: we could ask users to generate tags for each release).
The current implementation tries to keep things consistent by simply remembering the commit hash and does not really consider the version when resolving a git package.
In that sense, maybe the UI could have been made to show the commit id instead of the version. We’re aware that this could be improved…The team will discuss if maybe we could have a little something in the UI to ease the update of git packages.
1 Like
Bump. This is needed. At least add a “Check remote for updates & Apply” button – essentially just a 1-click button to “re-add” the repo as a package.