패키지 관리자는 레지스트리 데이터와 압축되지 않은 패키지에 대해 전역 캐시를 유지 관리합니다.전역 캐시에는 각각 다른 용도로 사용되는 보조 캐시가 포함되어 있습니다.패키지 관리자는 오버라이드할 수 있는 기본 위치에 전역 캐시를 저장합니다.
다음과 같은 다양한 이유로 캐시 위치를 오버라이드하려고 할 수 있습니다.
기본적으로 패키지 관리자는 전역 캐시에 대해 다음의 폴더 구조를 사용합니다.
<global-cache-root>
├── npm
│ └── <레지스트리 데이터(패키지 메타데이터 및 타르볼)>
├── 패키지
│ └── <패키지 tarball의 압축되지 않은 콘텐츠>
└── git-lfs(활성화된 경우)
└── <다운로드한 Git LFS 파일>
For information on the default location of the global cache root, see global cache.
Note: The Package Manager maintains separate caches for the global cache and the Asset Store package cache. For information on overriding the default location for the Asset Store cache, see Customize the Asset Store cache location.
전역 캐시 루트의 기본 위치를 오버라이드하기 위해 다음 방법을 사용할 수 있습니다.
cacheRoot
property in a user configuration file. If you want to set the configuration file manually, see Using a configuration file.UPM_CACHE_ROOT
환경 변수와 cacheRoot
프로퍼티를 모두 사용하여 전역 캐시 루트에 다른 값을 설정하면 패키지 관리자는 UPM_CACHE_ROOT
환경 변수의 위치를 사용합니다.UPM_NPM_CACHE_PATH
), 압축되지 않은 패키지 캐시(UPM_CACHE_PATH
) 또는 Git LFS 캐시(UPM_GIT_LFS_CACHE_PATH
)에 대한 환경 변수를 설정하면 패키지 관리자는 전역 캐시 루트의 위치에 관계없이 환경 변수에서 지정하는 위치를 사용합니다.UPM_GIT_LFS_CACHE_PATH
)를 명시적으로 설정하지 않고 Git LFS 캐시(UPM_ENABLE_GIT_LFS_CACHE
)를 활성화하면 패키지 관리자는 전역 캐시 루트 아래의 git-lfs
폴더를 위치로 사용합니다.To use the Preferences window to override the default location of the global cache, follow these steps.
다음 방법 중 하나를 사용하여 Preferences 창을 엽니다.
Package Manager 카테고리를 선택합니다.
Packages에서 Cache Location 옆에 있는 메뉴를 엽니다.
Change Location을 선택합니다.
전역 캐시의 새 위치를 선택합니다.
You can manually edit the same configuration file that the Preferences window sets to override the location of the global cache root:
Locate the .upmconfig.toml
user configuration file. To find the file location, see Configuration files. If the file doesn’t exist, create an empty text file.
cacheRoot
키를 추가하고 해당 값을 커스텀 위치에 대한 절대 경로로 설정합니다.중요:TOML 파일에서 Windows 경로를 설정할 때는 슬래시(/
) 또는 더블 슬래시(\\
)를 사용하십시오.백슬래시(\
)는 이스케이프 시퀀스를 표시하는 특수 문자이므로 TOML 구문 분석 오류를 발생시킬 수 있는 백슬래시를 사용하지 마십시오.
Windows 예시
cacheRoot = "E:\\Unity\\cache"
macOS 및 Linux 예시
cacheRoot = "/dev/external/shared/Unity/cache"
cacheRoot
키를 설정한 후 Unity 에디터 또는 Unity Hub를 다시 시작하지 않아도 변경 사항이 적용됩니다.
In scenarios that involve automation or continuous integration, it’s less practical and more error prone to configure settings in a configuration file or a preferences window. In such scenarios, you might consider using environment variables to configure settings for the global cache and its subsidiary caches. The following environment variables are available:
환경 변수: | 설명: |
---|---|
UPM_CACHE_ROOT |
전역 캐시(레지스트리 데이터와 압축되지 않은 패키지 캐시가 포함된 루트 폴더)의 위치를 지정합니다. |
UPM_NPM_CACHE_PATH |
패키지 관리자가 패키지 메타데이터와 타르볼을 저장하기 원하는 위치에 대한 절대 경로를 지정합니다.기본적으로 전역 캐시 루트의 npm 하위 디렉토리입니다. |
UPM_CACHE_PATH |
패키지 관리자가 패키지 타르볼의 압축되지 않은 콘텐츠를 저장하기 원하는 위치에 대한 절대 경로를 지정합니다.기본적으로 전역 캐시 루트의 packages 하위 디렉토리입니다. |
UPM_ENABLE_GIT_LFS_CACHE |
공백("")을 제외한 모든 값을 지정하여 Git LFS 캐시를 활성화합니다.기본적으로 패키지 관리자는 전역 캐시 루트의 git-lfs 하위 디렉토리를 사용합니다. 단, UPM_GIT_LFS_CACHE_PATH 환경 변수를 사용하여 다른 경로를 지정하는 경우는 예외입니다. |
UPM_GIT_LFS_CACHE_PATH |
패키지 관리자가 Git LFS 캐시를 저장할 위치의 절대 경로를 지정합니다. 이 경로를 설정하면 Git LFS 캐시가 자동으로 활성화됩니다. |
중요:이 방법을 사용할 때는 다음 가이드라인을 따르십시오.
환경 변수 설정에 대한 내용은 운영체제의 문서를 참조하십시오.환경 변수에 대한 소개는 https://en.wikipedia.org/wiki/Environment_variable을 참조하십시오.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.