This section shows you how to configure the following for the Package Manager:
此外,您可以在配置文件下找到 Package Manager 配置文件的位置。
Package Manager 支持两个配置文件:全局配置文件和用户配置文件。这两个文件都使用 TOML 格式,位于不同的位置:
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.