Hey, I am reading the manual and was confused as to what a scoped package registry was exactly. Specifically, I am trying to understand this sentence from the manual:
"A scoped registry allows you to use a registry in addition to the Unity default registry where you can host your own packages. Using scoped registries ensures that the Package Manager always maps a package to one and only one registry, guaranteeing a consistent result regardless of network conditions.
For example, if you set up your own server where you are hosting some of the Unity packages, you could end up getting the package from the wrong registry if one registry is temporarily unavailable, even if the Package Manager always searches the registries in the same order. However, if you set up a scoped registry for your own server, the package always maps to one and only one registry, guaranteeing a consistent result regardless of network conditions."
For your question, thereās an thread with an excellent example that should help you understand the concept better. Let me know if you had more questions after giving it a read.
So just to clarify, a scoped package is just another registry in addition to the default unity registry. The reason you would use a scoped registry is so you can host your own packages. My question is what does it mean to āhostā your own packages.
Could you explain the example above that I posted at the beginning Iām still having a hard time understanding it.
For example, if you set up your own server where you are hosting some of the Unity packages, you could end up getting the package from the wrong registry if one registry is temporarily unavailable, even if the Package Manager always searches the registries in the same order. However, if you set up a scoped registry for your own server, the package always maps to one and only one registry, guaranteeing a consistent result regardless of network conditions.
Iām not exactly sure what it means to have a server hosting unity packages and how thatās different than just having a scoped registry.
Iāll reach out to our technical writer and share your difficulty to understand this part of the manual. Iāll suggest them to update the documentation to make it clearer.
Thank you for your feedback. Iāll keep you posted when the documentation is updated.
Hi, Iām sorry you are finding the scoped registry documentation difficult to understand.
In answer to your question, most people or organizations would not host their own version of a Unity package. However, there are rare cases where an organization might need to create a local registry inside a closed network and host their packages from there but still retain the Unity package server as the main registry.
So basically a scoped registry is a registry in addition to the default unity registry where you can host your own packages. However not a lot of people would really need to use a scoped registry except organizations that may want to host their own version of a package, without getting it mixed up with the original one from the original registry. Is that correct or no?
Iām not exactly sure what it means to have a server hosting unity packages and how thatās different than just having a scoped registry. Like⦠what is a server?
In the case of scoped registries, companies/individuals would need to have somewhere to put their custom Unity packages - this is the āserverā. A package server is basically an application that keeps track of packages and is also where packages are stored - i.e. the destination of the scoped package repository URL.
An example of a āpackage serverā that Unity has mentioned in some of their documentation is Verdaccio - see their āWhat is Verdaccioā page.