Version: 2023.2
Global cache
解决网络问题

配置

This section shows you how to configure the following for the Package Manager:

此外,您可以在配置文件下找到 Package Manager 配置文件的位置。

配置文件

Package Manager 支持两个配置文件:全局配置文件和用户配置文件。这两个文件都使用 TOML 格式,位于不同的位置:

  • 全局配置文件适用于计算机上的所有用户。例如,为整台计算机设置代理服务器时,可以定义额外的 SSL 证书颁发机构
  • 用户配置文件适用于单个用户。例如,可以设置身份验证令牌,以用于通过作用域注册表访问的自定义包注册表服务器。这些令牌对特定用户帐户进行身份验证。

全局配置文件位置

Package Manager uses a global configuration file named upmconfig.toml. This file isn’t created when you install the Unity Hub or Editor, but you can create it in the following location if you need to customize your configuration:

环境: 位置:
Windows %ALLUSERSPROFILE%\Unity\config\upmconfig.toml (for example, C:\ProgramData\Unity\config\upmconfig.toml)
macOS 和 Linux /etc/upmconfig.toml

You can define a custom location that overrides the default location for your configuration file. To do this, create a UPM_GLOBAL_CONFIG_FILE environment variable and set its value to the absolute path of your configuration file, including the file name.

用户配置文件位置

Package Manager uses a user configuration file named .upmconfig.toml. This file isn’t created when you install the Unity Hub or Editor, but you can create it in the following location if you need to customize your configuration:

环境: 位置:
Windows(用户帐户) %USERPROFILE%\.upmconfig.toml (for example, C:\Users\myusername\.upmconfig.toml)
Windows(系统用户帐户 %ALLUSERSPROFILE%\Unity\config\ServiceAccounts\.upmconfig.toml(例如,C:\Users\Public\Unity\config\ServiceAccounts\.upmconfig.toml
macOS 和 Linux ~/.upmconfig.toml(例如,/Users/myusername/.upmconfig.toml

You can define a custom location that overrides the default location for your configuration file. To do this, create a UPM_USER_CONFIG_FILE environment variable and set its value to the absolute path of your configuration file, including the file name.

Global cache
解决网络问题