Kanda SDK 0.6.0
Loading...
Searching...
No Matches
Setting Up Package Manager

Kanda SDK is delivered using a private NPM registry. Users must be authenticated to access this registry, so it requires a few extra steps get it set up.

To use the Kanda SDK, you must have a supported version of Unity installed.

The Kanda Package Registry can be accessed in your browser at https://npm.kanda.dk.

1. Install Node Package Manager

Unity Package Manager uses Node Package Manager, npm, under the hood. Make sure you have Node Package Manager available on your system before proceeding.

2. Add your user to the registry

To add your user to the registry, use the command line:

npm adduser --registry https://npm.kanda.dk

After running the command, it will ask you to enter username and password. This is where you create an account to be able to use the registry, so specify a username and password.

If user registration has been locked down, you may need an authorized Kanda staff to create your user.

Note
When waiting for password input, you may see a "spinner", as if something is loading. This is a known issue in the NPM CLI. Simply input your password and press enter to progress to the next step. The password will remain hidden while typing.

3. Log in to the registry

Next, you need to log in to the Kanda Package Registry so we can retrieve an authorization token.

npm login --registry https://npm.kanda.dk

4. Set up registry authentication for Unity

In order for Unity Package Manager to communicate with the registry, you need to copy your credentials from the npm login process to the .upmconfig.toml file.

For detailed instructions, follow Unity's guide for scoped registry authentication.

On MacOS, this process might look something like:

# Read the npmrc file after login
$ cat ~/.npmrc
# Outputs: //npm.kanda.dk/:_authToken="my-secret-token"
# Create the UPM config file if it doesn't exist
$ touch ~/.upmconfig.toml
# Edit the UPM config file (any text editor will do)
$ nano ~/.upmconfig.toml
# In the text editor, set up auth with email and token like so:
[npmAuth."https://npm.kanda.dk"]
email = "my@email.com"
token = "my-secret-token"
alwaysAuth = true

On Windows, this process might look something like:

  • Locate and open generated .npmrc file
    • The file is located under: C:\Users<username>
  • Open the .npmrc file and copy the authToken
  • Store your token information in .upmconfig.toml file
    • Locate the .upmconfig.toml user configuration file. If the file doesn't exist, create an empty text file.
    • Fill it in like the following and save it
      [npmAuth."https://npm.kanda.dk"]
      email = "my@email.com"
      token = "my-secret-token"
      alwaysAuth = true

Continue to setting up project