CREATE UNITY PACKAGE INSTALLERS

What's this?

This simple API creates a .unitypackage that will install a Unity Package Manager package into your Unity project.
It will add the required scopes, automatically fetch the latest available version on installation, and remove itself after installation.
You can simply drop such a .unitypackage into Unity and click "import".

This reduces the friction of using custom registries considerably.
Around 500.000 package installations have been made easier using this service already.

If this sounds kinda complicated, well, yes. The only reason this is required is because Unity is treating packages with a love/hate relationship currently; all of this could be much, much easier. See What Unity Could Do, especially if you're a Unity person.

URL Generator

Use the form below to generate a URL for a package installer to install your package. For more info, see 'Basic API' below for the API format.

Please report any issues on GitHub ↗
Note: Chrome might detect the download as insecure, because the .unitypackage format is essentially a renamed ZIP file.


API

Basic format

http://package-installer.needle.tools/v1/installer/RegistryName/com.mycompany.mypackage?registry=https://packages.myregistry.com

Minimal example – latest version, automatic scope

If you omit the version, the latest available will be used on installation. If you omit the scope, the package name and dependencies will be used as scopes automatically.

Download Installer for Addressable Importer
Link to package on registry

http://package-installer.needle.tools/v1/installer/ api base
  OpenUPM/ registry name
    com.littlebigfun.addressable-importer package name
      ?registry=https://package.openupm.com registry url
      

Install a single package

Depending on how you set the scope, other packages from your registry will be visible and installable through PackMan.

Download Installer for Needle Compilation Visualizer
Link to package on registry

http://package-installer.needle.tools/v1/installer/ api base
  Needle/ registry name
    com.needle.compilation-visualizer package name
      @1.0.0 version to install
        ?registry=https://packages.needle.tools registry url
          &scope=com.needle scope
      

Install package & dependencies for registries with many scopes (e.g. OpenUPM)

If you don't specify the scope, the first level of dependencies will be automatically included. This helps to support e.g. packages on OpenUPM with dependencies between them. This package for example has a dependency on another OpenUPM package that will be automatically installed alongside.

Download Installer for ElZach LevelEditor
Link to package on registry

http://package-installer.needle.tools/v1/installer/ api base
  OpenUPM/ registry name
    elzach.leveleditor package name
      ?registry=https://package.openupm.com registry url
      

Install package and use a custom set of scopes

If you specify the scope= parameter, dependencies won't be fetched. To still include multiple scopes, you can use the scope parameter multiple times.

Download Installer for ElZach LevelEditor
Link to package on registry

http://package-installer.needle.tools/v1/installer/ api base
  OpenUPM/ registry name
    com.elzach.leveleditor package name
      ?registry=https://package.openupm.com registry url
        &scope=com.elzach first scope
          &scope=com.needle second scope
      

What Unity could do to make this easier

Unsupported – Contributions welcome!

li>
  • Install multiple packages
  • Set up multiple registries
  • Only set up registry, don't install packages
  • Make a nice badge / URL thingy
  • Add way more sanity checks
  • Check for package existance
  • Make package version optional (use latest)
  • Add tests
  • Add option to still get installer if package is inaccessible (e.g. needs auth)
  • Add option to include auth tools (Tomlyn for .npm auth setup)
  • Tests

    Made by Needle

    @needle-tools   @hybridherbst   @marcel_wiessler