IdleKit NPM Registry
This guide helps to set up our NPM registry. Before you read this guide you should:
- Have NPM installed in your environment
- Have a user account within our NPM registry with access
- Be sure that your project or Unity version can use the Unity Package Manager
NPM access
First of all, you need to login into our registry. Open your terminal and type:
npm adduser --registry https://packages.eastsidegames.com/repository/{repository-name}
Change the {repository-name}
to the repository you have access to. You will be prompted to type your login information and email.
After login in open or read your ~/.npmrc
file (In windows the file path should be something like this C:/Users/{your-username}/.npmrc
). You should then see something like this, inside the file:
//packages.eastsidegames.com/repository/:_authToken={token-id}
Copy the {token-id}
and open or create a .upmconfig.toml
under the same directory as the .npmrc
. Then add to the file:
[npmAuth."https://packages.eastsidegames.com/repository/{repository-name}"]
_authToken = "{token-id}"
alwaysAuth = true
Change the {repository-name}
and {token-id}
to match your information above.
Manifest file
To make sure the package you want to manage using the Package Manager works, you need to modify the dependencies
with the package name and the version to be used and update the scopedRegistries
with the information on where this package is hosted.
Info
Our package name structure looks like this com.{scope-name}.{package-name}
Here is how your manifest.json
will look like after updating it:
{
"dependencies": {
"com.{scope-name}.{package-name}": "1.0.0",
...
},
"scopedRegistries": [
{
"name": "eastsidegames",
"url": "https://idlekit-nexus-dev.eastsidegames.com/repository/{repository-name}", //the Host URL of the registry
"scopes": [
"com.{scope-name}"
]
}
]
}
Unity Package Manager
Now that you have the credentials and the information needed for downloading the package on your manifest.json
, open your unity (if you have it opened already, make sure to restart it), and then open the Package Manager. If everything is right, you should see the package you specified, like the one here:
If what you see is something similar to the image above, that means it's all set up.