Support for installing NugetForUnity via UPM
See original GitHub issueUnity recently implemented support for the package manager to be able to reference github repos as packages using the following format:
"com.popcron.console": "https://github.com/popcron/console.git"
With support for commitish identifiers, so you are able to target a specific branch if you add #branch
.
They don’t have any support for targeting a specific directory within a repository, so organizing it by folder isn’t possible. Though they are planning on supporting it later on according to their forum replies here.
The format for making a repository recognizable as a package by UPM, is to have a package.json file inside, and any .meta files included and up to date (documentation). My workflow with this, is to work with the repository cloned to my desktop, and reference it locally so that I am able to generate valid .meta files.
"com.popcron.console": "file:/Users/phill/source/repos/Popcron.Console"
Cheers!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:17
I refactored the project so it is a valid UPM project using the reference provided by the Unity Manual. You can try out by pressing the
+
button in the Unity Package Manager, clickingAdd package from git URL...
and enteringhttps://github.com/assert-not-singularity/NuGetForUnity.git#upm-package
or by adding the dependency"com.glitchenzo.nugetforunity": "https://github.com/assert-not-singularity/NuGetForUnity.git#upm-package"
to the manifest.json.There are still the CreateDLL and Packager folders in this branch it but they are not required anymore. Therefore, I did not try out if creating the
.unitypackage
still works. In my opinion, providing this package using UPM makes these redundant.Please try out if downloading the package via UPM works for you as well. I would then open a PR, if desired. But be aware to not use this in any productive project since I will might delete this testing branch some day.
Implemented in #480