프로젝트 매니페스트의 dependencies 속성은 패키지 이름을 버전에 매핑하는 JSON 객체입니다. 버전 숫자는 패키지 레지스트리에서 다운로드할 패키지 버전을 나타냅니다. 예를 들어 다음과 같습니다.
{
"dependencies": {
"com.my-package": "2.3.1",
"com.my-other-package": "1.0.1-preview.1",
etc.
}
}
버전 숫자 사용 외에도 패키지 관리자는 다음과 같은 프로젝트 종속성 추가를 지원할 수도 있습니다.
직접 종속성은 프로젝트 수준 종속성입니다. 패키지 관리자 창을 통해 패키지를 설치하거나 manifest.json
프로젝트 파일을 수동으로 편집하여 종속성을 명시적으로 추가하면 다음과 같이 직접 패키지 종속성이 생성됩니다().
패키지는 자체 종속성을 다른 패키지에 선언할 수 있습니다. 그러한 패키지 종속성은 패키지를 설치할 때 프로젝트의 간접() 또는 중간적 종속성이 됩니다.
패키지 관리자는 프로젝트의 종속성이 어떻게 되든 상관없이 설치할 각 패키지 버전을 결정합니다. 이를 수행하기 위해 더 높은 우선순위 버전이 다른 요구 사항을 위반하지 않는 한 간접 종속성보다 직접 종속성을 우선시합니다.
이러한 평가를 종속성 해결이라고 하며 다음의 논리를 따릅니다.
경우에 따라 이러한 해결 전략을 수동으로 오버라이드할 수 있습니다. 이렇게 하기 위해 프로젝트 매니페스트에 특정 버전을 요청합니다(패키지 관리자 창에서 설치하거나 매니페스트를 직접 편집하여). 이렇게 하면 모든 해결 전략보다 우선하는 직접 종속성을 만듭니다.
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.