Skip to content

Installing via UPM (Git)

Cronyx edited this page Feb 26, 2021 · 9 revisions

Git Logo

Using the Unity Package Manager, packages can be installed using the package's git URL. There are (currently) a few downsides to using this approach:

  • No version control. In order to update the package, you will have to do so manually (see below).
  • Requires Git. You and your collaborators will need to have installed the Git CLI in order to download the package.

Nonetheless, this approach is provided for convenience sake. If you decide to install the DeveloperConsole like this, keep in mind the points above.

Prerequisites

  1. Unity 2020.2 or greater.
  2. Git. To download git, see this page.

Installation

Using Package Manager Window

Open the package manager window by going to Window > Package Manager. Click the ➕ icon in the top left corner of the window and choose Add package from git URL...:

To install the latest released version of the package, paste the following URL into the input field:

https://github.com/cronyxllc/DeveloperConsole.git#upm

To use any other version of the package, replace upm in the above URL with your desired version number, e.g.:

https://github.com/cronyxllc/DeveloperConsole.git#v1.0.0

For a list of all version numbers, see the list of Git tags for this repository.

Using manifest.json

Open your project's manifest.json file. This should be located at [UNITY PROJECT DIR]/Packages/manifest.json. Add a dependency for this package inside manifest.json like so:

{
    "dependencies": {
        "com.cronyx.console": "https://github.com/cronyxllc/DeveloperConsole.git#upm"

        // ... other packages ...
    }
}

This will install the latest released version of the package. To use a different version, replace upm in the above git URL with your desired version number, e.g.:

{
    "dependencies": {
        "com.cronyx.console": "https://github.com/cronyxllc/DeveloperConsole.git#v1.0.0"

        // ... other packages ...
    }
}

For a list of all version numbers, see the list of Git tags for this repository.

Updating

Using Package Manager Window

Open the Package Manager Window (Window > Package Manager) and follow the same installation instructions using the Package Manager for a new version's git URL.

Using manifest.json

To update the package when using git URLs, first open your project's manifest.json file located at [UNITY PROJECT DIR]/Packages/manifest.json. Update the version number of the package to one of the URLs specified in the Installation section above, and finally remove the package lock inside manifest.json to force Unity to re-download the package:

@@ Packages/manifest.json @@
{
    "dependencies": {
-        "com.cronyx.console": "https://github.com/cronyxllc/DeveloperConsole.git#v1.0.0",
+        "com.cronyx.console": "https://github.com/cronyxllc/DeveloperConsole.git#v1.1.0",

         // ... other packages ...
    },
    "lock": {
-        "com.cronyx.console": {
-            "revision": "v1.0.0",
-            "hash": "d276148f4003d2e816c1ad6c40f67f611de7f0e3"
-        }
    }
}