Version: 2020.3
Global Cache
Solving network issues
How do you use documentation throughout your workflow? Share your experience with us by taking this survey.

Configuration

This section provides information about how to configure the following for the Package Manager:

Customizing the shared cache location

You can use two environment variables to override either global cache folder:

  • UPM_NPM_CACHE_PATH overrides the npm folder path. For example:

    # On macOS/Linux:
    UPM_NPM_CACHE_PATH=/dev/ssd/shared/Unity/cache/npm
    echo $UPM_NPM_CACHE_PATH
    
    # On Windows:
    set UPM_NPM_CACHE_PATH=%ALLUSERSPROFILE%\Unity\config\npm
    echo %UPM_NPM_CACHE_PATH%
    
  • UPM_CACHE_PATH overrides the packages folder path. For example:

    # On macOS/Linux:
    UPM_CACHE_PATH=/dev/ssd/shared/Unity/cache/packages
    echo $UPM_CACHE_PATH
    
    # On Windows:
    set UPM_CACHE_PATH=%ALLUSERSPROFILE%\Unity\config\package
    echo %UPM_CACHE_PATH%
    

You must restart the Unity Editor and the Hub after changing either of these environment variables for them to take effect.

Configuration files

Package Manager supports two levels of configuration: global and user. Both of these levels use a custom configuration file using the TOML format, which appears in different locations depending on its configuration type.

  • Global configuration files apply to all users on the machine. For example, you can define additional SSL certificate authorities when setting up a proxy server for the entire machine.
  • User configuration files apply to a single user or a Windows System User account. For example, you can set up authentication tokens to use for custom package registry servers that you access with scoped registries. These tokens authenticate a specific user account.

Global configuration file location

Package Manager uses a global configuration file named upmconfig.toml, which you can find here:

Environment: Location:
Windows %ALLUSERSPROFILE%\Unity\config\upmconfig.toml
macOS and Linux /etc/upmconfig.toml

User configuration file location

Package Manager uses a user configuration file named .upmconfig.toml, which you can find here:

Environment: Location:
Windows %USERPROFILE%\.upmconfig.toml (for example, C:\Users\myusername\.upmconfig.toml)
Windows (system user) %ALLUSERSPROFILE%\Unity\config\ServiceAccounts\.upmconfig.toml (for example, C:\Users\Public\Unity\config\ServiceAccounts\.upmconfig.toml)
macOS and Linux ~/.upmconfig.toml (for example, /Users/myusername/.upmconfig.toml)
Global Cache
Solving network issues