By default the openupm will query any package from the following registries:
- Openupm (https://package.openupm.com)
- Unity (https://packages.unity.com)
Any package will be searched on these registries in the order that they are listed above. If you want to install packages from your own third party registries you can do this via the --registry
option.
openupm --registry https://package.my-registry.com add com.my.package
This will query the following registries:
- The private registry (https://package.my-registry.com)
- Unity (https://packages.unity.com)
Let's say com.my.package
depends on a Openupm package. With the above configuration the install would fail because Openupm is not part of the queried registries. To fix, add Openupm to the --registry option.
openupm --registry https://package.my-registry.com https://package.openupm.com add com.my.package
The query will now look like this:
- The private registry (https://package.my-registry.com)
- Openupm (https://package.openupm.com)
- Unity (https://packages.unity.com)
Finally, it may not always be desirable to search the Unity registry. If you want to remove it from the registry list, run with the --no-upstream
option.
openupm --registry https://package.my-registry.com https://package.openupm.com --no-upstream add com.my.package
The resulting query is:
- The private registry (https://package.my-registry.com)
- Openupm (https://package.openupm.com)